Saturday 10 August 2013

うまくいかなくない

If you want to get an element out of a list by index, use !!. The indices start at 0.

    ghci> "Steve Buscemi" !! 6  
    'B'  
    ghci> [9.4,33.2,96.2,11.2,23.25] !! 1  
    33.2 
-- from http://learnyouahaskell.com/starting-out#an-intro-to-lists .

 learn you a haskell for great good, あのノリがあんまり好きになれなさそうなんだが,
ううん.

No comments:

Post a Comment