Personal tools

Cum definim asocierea si prioritatea operatorilor ?

From HaskellWiki

Revision as of 05:43, 31 May 2009 by Ha$kell (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Se defineste pentru operatorii infixati, folosind, bineinteles, infix, infixl sau infixr.

Sintaxa este:

infixl sau infixr sau pur si simplu infix urmat de numarul nivelului de prioritate urmat de simbolul operatorului.


Semnificatia:

infix - neasociativ

infixl - asociativ la stanga (left)

infixr - asociativ la dreapta (right)


Gasiti exemple in Introducere in Haskell 98 prin exemple sau in cartile de la Biblioteca.