Haskell ha un modulo Data.Map che include, tra le altre funzioni, un !
function.Come importare un punto esclamativo (o altro operatore) dal modulo Haskell
fromList [(5,'a'), (3,'b')] ! 1 Error: element not in the map
fromList [(5,'a'), (3,'b')] ! 5 == 'a'
Mentre posso importare altre funzioni dal modulo Data.Map nel mio codice ...
import Data.Map(Map, keys, fromList)
... seguente non funziona ...
import Data.Map(Map, keys, fromList, !)
ottengo il seguente errore:
parse error on input `!'
Qual è la sintassi corretta per importare articoli come !
?