all - pannous/warp GitHub Wiki

The all keyword takes a block making it a functor similar to map: all files{ delete it }

If no block is given, then

The all keyword is a destructor, splicing a list into its items.

It is usually not needed:

All functions are automatically broadcasting on lists and pair values:

# not yet: run `…` shell commands (card shell-backtick-run)
square number=number*number
square [1 2 3] == [1 4 9]

square [a:1 b:2 c:3] == [a:1 b:4 c:9]

delete file = run `rm $file.name`
delete files in ls /   # 🧐

In some cases the destructor all can differentiate between function signatures:

# not yet: printf, print dispatching on a list (card print-list-dispatch)
print numbers = print "one at a time please"
print number  = printf("%d",d)

print [1 2 3] == "one at a time please"
print [1 2 3] == "1" "2" "3"