Haskell Keywords

0.0(0)
studied byStudied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/4

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:00 PM on 4/14/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

5 Terms

1
New cards

Define a “recip” function which takes the reciprocal of a fractional type value.

recip :: Fractional a => a → a
recip n = 1/n

2
New cards

How would you write the guarded equation version of the function abs, which finds the absolute value of an Int, Integer, Float or Double?

abs n | n >= 0 = n
| otherwise = -n

3
New cards

What does the ‘otherwise’ keyword imply?

It is defined in the prelude as otherwise = True.

4
New cards

What is the “:” symbol?

Called “cons”, it constructs a list by prepending a new element to teh start of an existing list.

5
New cards

What does the “\” symbol indicate?

A lambda expression!

Explore top notes

note
CGO casus 6
Updated 403d ago
0.0(0)
note
Chapter 2 - Mughal Empire
Updated 1210d ago
0.0(0)
note
Chapter 12: Forensic DNA Profiling
Updated 1056d ago
0.0(0)
note
Media Industries
Updated 584d ago
0.0(0)
note
CLE Q3
Updated 741d ago
0.0(0)
note
Chapter 9: Kinds of Research
Updated 1322d ago
0.0(0)
note
Chapter 8: The Russian Federation
Updated 1057d ago
0.0(0)
note
CGO casus 6
Updated 403d ago
0.0(0)
note
Chapter 2 - Mughal Empire
Updated 1210d ago
0.0(0)
note
Chapter 12: Forensic DNA Profiling
Updated 1056d ago
0.0(0)
note
Media Industries
Updated 584d ago
0.0(0)
note
CLE Q3
Updated 741d ago
0.0(0)
note
Chapter 9: Kinds of Research
Updated 1322d ago
0.0(0)
note
Chapter 8: The Russian Federation
Updated 1057d ago
0.0(0)

Explore top flashcards

flashcards
Właściwościunie
111
Updated 320d ago
0.0(0)
flashcards
Constitution Study Guide
57
Updated 135d ago
0.0(0)
flashcards
AQA GCSE Music Keywords
222
Updated 1196d ago
0.0(0)
flashcards
Set 1 (Fall Comp 1)
25
Updated 919d ago
0.0(0)
flashcards
Logical Fallacies Study Guide
28
Updated 1046d ago
0.0(0)
flashcards
spanish numbers
35
Updated 1102d ago
0.0(0)
flashcards
Właściwościunie
111
Updated 320d ago
0.0(0)
flashcards
Constitution Study Guide
57
Updated 135d ago
0.0(0)
flashcards
AQA GCSE Music Keywords
222
Updated 1196d ago
0.0(0)
flashcards
Set 1 (Fall Comp 1)
25
Updated 919d ago
0.0(0)
flashcards
Logical Fallacies Study Guide
28
Updated 1046d ago
0.0(0)
flashcards
spanish numbers
35
Updated 1102d ago
0.0(0)