JanetDocsPlaygroundI'm feeling luckyGitHub sign in

-?>



    macro
    boot.janet on line 1144, column 1

    (-?> x & forms)

    Short circuit threading macro. Inserts x as the second value in the 
    first form in forms, and inserts the modified first form into the 
    second form in the same manner, and so on. The pipeline will return 
    nil if an intermediate value is nil. Useful for expressing 
    pipelines of data.


1 exampleSign in to add an example
Loading...
(defn return-nil [x] nil)
(-?> 1 inc)                     # -> 2
(-?> 1 inc inc)                 # -> 3
(-?> 1 inc inc return-nil)      # -> nil
(-?> 1 inc inc return-nil inc)  # -> nil
cellularmitosisPlayground