functional

functional

Otillräckligt med betyg
List Contains
   
Utmärkelse
Favorit
Favoritmarkerad
Avfavoritmarkerad
Filstorlek
Lades upp
775.000 B
11 nov, 2022 @ 18:23
1 ändringsnotis ( visa )

Abonnera för att ladda ner
List Contains

Beskrivning
Write a function CONTAINS that, given a list and a numeral, reduces to TRUE if the numeral is in the list and FALSE otherwise.

Examples:
- CONTAINS [1,2,3,4] 3 -> TRUE
- CONTAINS [0,3,7] 1 -> FALSE
- CONTAINS [1,1,2,2] 2 -> TRUE
- CONTAINS [ ] 0 -> FALSE

Input is guaranteed to be a well-formed list and numeral.