Nightclazz Zenika Bordeaux

Civodul
1,796 views
undefined

Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Les tuples

Déclaration d'un tuple
createTuple :: Int -> String -> (Int, String)
createTuple intValue stringValue = (0, "")
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Retourner le premier élément
firstElement :: (Int, String) -> Int
firstElement tuple = 0
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Retourner le second élément
secondElement :: (Int, String) -> String
secondElement tuple = ""
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content