JanetDocsPlaygroundI'm feeling luckyGitHub sign in

as?->



    macro
    boot.janet on line 1345, column 1

    (as?-> x as & forms)

    Thread forms together, replacing `as` in `forms` with the value of 
    the previous form. The first form is the value x. If any 
    intermediate values are falsey, return nil; otherwise, returns the 
    last value.


1 exampleSign in to add an example
Loading...
(as?-> [1 2 3] _ 
  (sum _)
  (when (> 6 _) _))
# => nil

(as?-> [1 2 3] _ 
  (sum _)
  (when (>= 6 _) _))

# => 6
leobmPlayground