(* Programming Languages (F28PL) lecture transcript - 13th September at 11:15 *) (* Entering text between double quotes will automatically be recognised as a string *) "Make sure you can use PuTTy to remote ssh into jove"; (* We can print the variable 'it'. In this case it would be the string we entered previously *) it; (* Let's calculate 5 + 5 *) 5+5; (* ints can be larger than 64-bit in poly - arbitrary precision *) 100000000000000000000000000000; (* We can see the type of the + operator function *) op +; (* We can concatenate strings by using the ^ operator *) "Hello"^" "^"world"; (* We can use op when we want to run operators with function syntax *) (op +) (5,6); (* This is the 'syntactic sugar' version of the function above. *) 5+6; (* We create a function which inputs x, and outputs the result of x+x *) fun selfadd x = x+x; (* A function that runs the input x into function f, and output of that into function f *) fun selfcompose f x = f(f(x));