Personal tools

Ce deosebire este intre

From HaskellWiki

Revision as of 05:58, 11 February 2011 by Ha$kell (Talk | contribs)

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


&& si and ?


O simpla intrebare pusa interpretorului Hugs ne spune ce tipuri au:

__   __ __  __  ____   ___      _______________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Bugs: http://hackage.haskell.org/trac/hugs
||   || Version: Sep 2006       _______________________________________________
 
Haskell 98 mode: Restart with command line option -98 to enable extensions
 
Type :? for help
Hugs> :t (&&)
(&&) :: Bool -> Bool -> Bool
Hugs> 
Hugs> :t and
and :: [Bool] -> Bool
Hugs>

Deci: && este un operator care poate prmi doar doua (cel mult) argumente de tip Bool si calculeaza conjunctia lor logica. Iar and are ca argumente o lista de valoori Booleene si calculeaza conjunctia lor.


In cazul in care stiti bine limba franceza ati putea fi interesati sa rulati Haskell pe Mandriva Linux care de altfel are si suport pentru alte limbi.

Banim7.gif

Haskell ruleaza si sub Linux si sub Win-dos ! Fiti mai destepti si luati un computer cu Sistem de operare Mandriva Linux ! (Aceasta este o parodie a bannerului unei campanii publicitare, in spiritul dreptului la replica si al libertatii opiniei.)