20-CS-4003-001 Organization of Programming Languages Fall 2017
Basic Operations

Lambda calculus, Type theory, Formal semantics, Program analysis

Prev     Next     All lectures        Code

Arithmetic Operations

 (define a1 (max 1 3 0 6 5 4)) - a1 is the maximum of a list of numbers (define a2 (min 1 3 0 6 5 4)) - a2 is the minimum of a list of numbers (define a3 (string-append "Hello " "World")) - a3 is a string (define a4 (string-ref "Hello" 2)) - a4 is a character (define a5 (/ (* 2 (+ 2 3) a1))) - a5 is a number (define a6 (+ 2 (* 4 3))) - a6 is a number (define a7 (modulo 10 3)) - a7 is a number (define a8 (floor (/ 10 3))) - a8 is a number (define a9 (/ 2238716240498246197461704531628 746238746832748732487234843876)) - a9 is a tiny number (define a10 (* 9387428934729374892374829374892748923479847329342798 93284093284092384092840982409328409328409328409284092)) - a10 is a really big number (define a11 (list a1 a2 a3 a4 a5 a6 a7 a8 a9)) - a11 is a list of the results above minus a10