3 ms·
That blows my mind, but certainly not in a good way. Ruby: $ echo 'hello world' | ruby -e 'p STDIN.read.split'
by stouset 15y ago
That blows my mind, but certainly not in a good way. Ruby:
$ echo 'hello world' | ruby -e 'p STDIN.read.split'
- nemetroid 15y agoBe aware that those are four separate examples made to showcase features of the language, the simplest of which being just `words`. split.hs: main = interact (show . words) $ echo hello world | runhaskell split.hs
- scrame 15y agoOK, thats not really clear from the layout. Your example is clearer, but if you have to put it in a script and pipe stuff to it, its not really a 1-liner.