3 ms·
Almost correct. The signature is there, eg. > Usage: (print & more) '& more' means 'any number of arguments stuffed into a sequence called more' > (print [1
by lbj 8y ago
Almost correct.
The signature is there, eg.
> Usage: (print & more)
'& more' means 'any number of arguments stuffed into a sequence called more'
> (print [1 2 3])
"[1 2 3]"
nil
There are a number of ways to print an array of lines and doseq is one. Its designed for statements at have no return.
- atombender 8y agoI saw that, but the signature has no types or no indication as to what the return value might be. If you look at the documentation for functions that do have return values, there's no signature either, just a fairly vague English description of what it returns. Dynamic duck-typing all the way, no type inference. Anyway, my point was, no effects system. There's no way to determine if something has side effects or prevent them. Very far from Haskell's purity. I wouldn't criticize Haskell for a "trick" that enables the impressive feat of maintaing purity with side effects (while at the same time maintaining strict enforcement of types throughout) when Clojure doesn't even have any kind of effects management.