yamlscript

Ingy döt Net 2023-12-13T19:33:58.006449Z

I posted https://www.linkedin.com/pulse/introducing-yamlscript-ingy-d%25C3%25B6t-net-lmsff to LinkedIn just now.

🎉 1
Ingy döt Net 2023-12-13T19:34:37.523509Z

The tree program is so much better now that the original Dec 1 version.

Ingy döt Net 2023-12-13T19:34:54.934389Z

Implement as you blog :\

Ingy döt Net 2023-12-13T00:15:28.852229Z

Posted this in #clojure but I just got let bindings and lambda functions working in YS! Here's an example of using let-over-lambda closures in YS:

$ cat sample/lol.ys 
!yamlscript/v0

defn lol(x):
  y =: 2 * x
  =>: \(% + y)

say:
  lol(10): 4
$ ys --compile sample/lol.ys 
(defn lol [x] (let [y (_* 2 x)] (fn [_1] (+ _1 y))))
(say ((lol 10) 4))
$ ys sample/lol.ys 
24

👀 1