Currently, SAWScript offers a for function for iterating over a list in a monadic fashion:
for : {m, a, b} [a] -> (a -> m b) -> m [b]
For many use cases, however, it would be more convenient to iterate over a list without needing a monad m. For these scenarios, we should offer a map function:
map : {a, b} (a -> b) -> [a] -> [b]
SAWScript does not currently offer this, but it could easily be added.
Currently, SAWScript offers a
for
function for iterating over a list in a monadic fashion:For many use cases, however, it would be more convenient to iterate over a list without needing a monad
m
. For these scenarios, we should offer amap
function:SAWScript does not currently offer this, but it could easily be added.