COMPSCI 220 Lecture Notes - Lecture 1: Command-Line Interface, Mkdir
Document Summary
Scala is coding language, essentially a shorter version of java. Type inference (don"t need to define types. ) Cd - go into the following file. Ls - list all files in current folder. Cd - go back up one directory. Mkdir - make directory of the following name. Import objectname. _ - import everything from that object. Scala will automatically generate variables for results (e. g. res. Don"t need to use semicolons (unlike java) Need to quit scala console, reopen if you make a change! Use val" to name local variables (e. g. val dogs = ) Read online lecture notes on how to make test cases. Nil: scala version of null for empty list, add to list accordingly ( list (5 :: nil) ) Be careful: you don"t get an error in scala for a list of multiple types (which is bad) Can redefine things at the console, not within.