This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-13
Channels
- # adventofcode (37)
- # announcements (11)
- # babashka (46)
- # beginners (35)
- # biff (1)
- # clojure (44)
- # clojure-austin (1)
- # clojure-europe (23)
- # clojure-nl (2)
- # clojure-norway (8)
- # clojure-uk (5)
- # conjure (3)
- # cursive (22)
- # data-science (13)
- # docker (11)
- # events (8)
- # hyperfiddle (7)
- # joyride (1)
- # juxt (9)
- # malli (7)
- # matrix (4)
- # pedestal (3)
- # podcasts-discuss (1)
- # portal (1)
- # re-frame (62)
- # reitit (2)
- # releases (1)
- # schema (3)
- # sql (14)
- # squint (3)
- # xtdb (6)
- # yamlscript (4)
Posted this in #C03S1KBA2 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
I posted https://www.linkedin.com/pulse/introducing-yamlscript-ingy-d%25C3%25B6t-net-lmsff to LinkedIn just now.
🎉 1
The tree program is so much better now that the original Dec 1 version.
Implement as you blog :\