JanetDocs
Playground
I'm feeling lucky
GitHub sign in
Run
Format
# absolute value of negatives, ignore positives (keep |(if (< $ 0) (- $) nil) [-1 2 -3 -4 -5 6]) # -> @[1 3 4 5] # halves each even number, ignores odds (keep |(when (even? $) (/ $ 2)) [1 2 8 7 -2]) # -> @[1 4 -1]