This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
; main.lsp:
(load "lib/a.lsp")
; a.lsp:
(load "b.lsp")
> (help curry)
Syntax: (curry func exp)
Transforms func from a function f(x, y) that takes two arguments into a function fx(y) that takes a single argument. curry can be used on all functions taking two arguments.
Examples:
(set 'f (curry + 10)) → (lambda () (+ 10 (args 0)))
(map (curry list 'x) (sequence 1 5)) → ((x 1) (x 2) (x 3) (x 4) (x 5))
(setq var1 "some value")
(Json:lisp->json '(("var1" var1) ("a" 2) ("var2" '(("b" 3) ("c" (+ 2 2))))))
;; will result in -> { "var1": "var1", "a": 2, "var2": { "b": 3, "c": ["+", 2, 2] } }
;; -> { "var1": "some value", "a": 2, "var2": { "b": 3, "c": 4 } }