functional

functional

Not enough ratings
List Contains
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
775.000 B
11 Nov, 2022 @ 6:23pm
1 Change Note ( view )

Subscribe to download
List Contains

Description
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.