Simpleton Regular Expression Matching in Haskell

Simpleton Regular Expression Matching in Haskell

memorize.aimemorize.ai (lvl 286)
Section 1

Preview this deck

algebraic data type

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (5)

Section 1

(5 cards)

algebraic data type

Front

a type where we specify the shape of each of the elements - make our own data type using the keyword data

Back

pattern matching

Front

specify patterns to which some data should conform and then checking to see if it does and deconstructing the data according to those patterns

Back

deriving show

Front

Haskell doesn't know how to represent our data type as a string and cannot print value in command line - show function makes our data type part of the show type class and gets the string representation of the value

Back

guarded equations

Front

ways of testing whether some property or value is true or false - similar to an if statement

Back

to implement functions in haskell...

Front

we use equations and pattern matching

Back