Employers: discover CodinGame for tech hiring
CodinGame - Home
EVENTS
UPCOMING
PAST
SOLO
PUZZLES
CODE GOLF
OPTIMIZATION
LEARN
MULTI
CLASH OF CODE
BOT PROGRAMMING
CODING ESCAPE
COMMUNITY
LEADERBOARDS
CONTRIBUTIONS
DISCORD
FORUM
LIVE STREAMS
BLOG
Log In
Sign Up
Nightclazz Zenika Bordeaux
Civodul
9,025 views
01
Bonjour Haskell
02
Les types primitifs
03
Les listes
04
Les tuples
05
Les fonctions
4/5
Les tuples
Previous:
Les listes
Next:
Les fonctions
Les tuples
Déclaration d'un tuple
1
2
createTuple :: Int -> String -> (Int, String)
createTuple intValue stringValue = (0, "")
Run
Retourner le premier élément
1
2
3
firstElement :: (Int, String) -> Int
firstElement tuple = 0
Run
Retourner le second élément
1
2
3
secondElement :: (Int, String) -> String
secondElement tuple = ""
Run
4
0
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
Suggested playgrounds
CodinGame - Home
ABOUT US
CAREERS
PRIVACY
FAQ
CodinGame - Work
The #1 tech hiring platform
SCREENING
INTERVIEWING
ABOUT US
CAREERS
PRIVACY
FAQ
Facebook
YouTube
Twitter
LinkedIn
FR
EN