I am wondering how can I ask ghci to show an infinite list wisely.
When I type
*fst ([1..],[1..10])*
The result is what as you may guess
*1,2,3,4,...*(continues to show, cut now)
How could I may ghci show
*[1..]*
this wise way not the long long long list itself?
Yi
__
s. But can other strings be used this way? Like in bash, we can use
*ping 127.0.0.1* where *127.0.0.1* is an argument.
If not, can *foo* be defined as a function so that it recognize arguments
like *bar* as *"bar"*?
Thanks,
Yi Lu
___
Hask
into *[String]* with
*lines*function. Here is what I have tried.
link<https://github.com/eccstartup/findDict/blob/master/src/Data/Dict/Utils.hs>I
think I could directly operate on
*[String]*. But it is not true for me.
[1] http://www.haskell.org/hoogle/?hoogle=IO+String+-%3E+String