Employers: discover CodinGame for tech hiring
EVENTS
UPCOMING
PAST
SOLO
PUZZLES
CODE GOLF
OPTIMIZATION
MULTI
LEADERBOARDS
CLASH OF CODE
BOT PROGRAMMING
CODING ESCAPE
COMMUNITY
CONTRIBUTIONS
LEARN
DISCORD
FORUM
LIVE STREAMS
1
Log In
Sign Up
Nightclazz Zenika Bordeaux
Civodul
10.1K 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
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
Nightclazz Zenika Bordeaux Template
By
Civodul
3,634
0
0
Try Haskell!
By
JBM
16.4K
54
0
Haskell
By
JBM
8,918
7
0
Python from Zero to Hero
By
toEpam
6,082
65
0
ABOUT US
CAREERS
PRIVACY
FAQ
BLOG
ABOUT US
CAREERS
PRIVACY
FAQ
BLOG
The #1 tech hiring platform
SCREENING
INTERVIEWING
Facebook
YouTube
Twitter
LinkedIn
FR
EN