Macros

->


(macro -> (arg fn1 ...fns) (...)) Chain calls on a given value, for a nicer syntax

Author: @SuperFola

Parameters

Example

(import std.Macros)
(-> "f0" f1)  # equivalent to (f1 "f0")
(-> "f0" f1 f2 f3) # equivalent to (f3 (f2 (f1 "f0")))
(-> "f0" f1 (apply _ f2) (apply _ f3))  # equivalent to (apply (apply (f1 "f0") f2) f3)

partial


(macro partial (func ...defargs) (...)) Create a partial function with prefilled arguments