CSC324H5 Lecture Notes - Lecture 4: Type System, Pattern Matching, Eval

69 views3 pages
24 Nov 2017
School
Course
Professor

Document Summary

- work ow: write le and load in repl ghci. - \x -> x + 4 in repl err: repl want to convert to str to output. - use let x = 10 in repl. - use x = 10 in source le x = 10 f1 = \x -> x + 4 f2 x = x + 4 -- nicer syntax, only di . - (+) 3 4 -- equiv: 3 + 4 x y = x + y * 100. - let in haskell, similar to let* in racket g y = let x = y + 3 z = 10 w = x + y in x + y * z - w. - just like racket macros myf 3 = 100 myf x = 32 + x. - if only have myf 5 = 100. - cons: 1 : [2, 3] (in x), (:) 1 [2, 3] (pre x)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents