double exclamation marks in haskell -


i have code:

ghci>let listoffuns = map (*) [0..] ghci>(listoffuns !! 4) 5 20 
  1. what !! mean?

    i saw example double exclamation this:

    ghci> [1,2,3,4]!!1 ghci> 2

but seems don't apply question example.

  1. how understand function. need explanations.

!! indexes lists. takes list , index, , returns item @ index. if index out of bounds, returns ⊥.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -