Difference between revisions of "La ce serveste apostroful invers (`) ?"
Jump to navigation
Jump to search
m |
|||
Line 2: | Line 2: | ||
Transforma o functie cu doua argumente intr-un operator infixat. |
Transforma o functie cu doua argumente intr-un operator infixat. |
||
Exemplu: |
Exemplu: |
||
+ | <haskell> |
||
g :: Int -> Int -> Int |
g :: Int -> Int -> Int |
||
g a b = a+b |
g a b = a+b |
||
+ | </haskell> |
||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
+ | |||
+ | |||
+ | ---- |
||
+ | |||
+ | Pagina indexata la indexul [[Category:Ro]] [http://www.haskell.org/haskellwiki/Category:Ro Categories:Ro] |
||
+ | ---- |
||
⚫ |
Revision as of 09:24, 21 January 2008
Transforma o functie cu doua argumente intr-un operator infixat.
Exemplu:
g :: Int -> Int -> Int
g a b = a+b
Functia se poate folosi acum si ca un operator: 1 `g` 2 ... ceea ce e echivalent cu: g 1 2
Pagina indexata la indexul Categories:Ro