Hacker News new | ask | show | jobs
by colejohnson66 3651 days ago
Any particular reason you can't output the length before the array stream? (I don't know APL, but want to learn it)
1 comments

The problem is that unix pipe can be blocked and you can see it as a lazy partial evaluation, so grep a HUGEFILE|head returns when 10 lines are found. In APL the semantics is not builtin, though things like ⍴↑↓ can be lazy, it's the internal optimization, rather than a language specification.