Hmmm, lots of REPL input/output, nearly no informative descriptions. Besides that some descriptions are wrong or inaccurate, three randomly picked examples (and I am not a Scala programmer):
* "compose calls the second function and then the first function."
* "Maps - It can hold basic datatypes."
* "foldRight Is the same as foldLeft except it runs in the opposite direction."
I'd recommend friends to buy a good, well-edited book.
1. 'compose f g' doesn't call g and then f, but it constructs a new function of the form \x -> f (g x).
2. Maps store mappings between keys and values.
3. Left and right folds both process a list recursively from start to end. However, left folds apply the given function first and then recurse. Right folds recurse first and then apply. As a result, in right folds the given function is applied to the last element first.
Also, right folds preserve the structure of the datatype folded over. If you fold right over a list with the empty list as the start value and cons (or (_::_) in scala) as the operation, you get the original list back (i.e. same value, not same object). A left fold on the other hand is just some arbitrary looping constuct.
I am no master myself but I will take a stab at it.
* "compose calls the second function and then the first function."
I would not call that wrong or inaccurate just very empty and not clear. What is the first function the left or right? Whatever the definition, it may as well be a tautology. If I was explaining composition I would explain it in a way that pulls from prior knowledge but also does not hamstring the learner.
In particular composition need not follow any particular direction. What matters in composition is in the ordering of the types, the outputs must fit the inputs. That is you can have f : B <- A and g : C <- B then h = f o g is a function from C <- A that is identical to a function formed by first applying f to its argument and piping that to g. Composition is a way of making new functions from old ones, kind of like multiplication for functions.
* "Maps - It can hold basic datatypes."
I don't know what that is supposed to mean. But Maps in functional languages tend to be immutable tree based key value data structures.
* "foldRight Is the same as foldLeft except it runs in the opposite direction."
This one is dangerous because it is true in a sense they are dual to each other. But applied indiscrimnately you could end up with different results unless operation with respect to the values is commutative and associative. remember the associative rule from school? Is 5 - (8 - 5) = (5 - 8) - 5? You can think of foldLeft as an accumulating a value and foldright as reducing to a value. foldRight is also less space efficient although you can write it in terms of foldl. However in a lazy language foldr has the additional distinction of being able to work with infinite lists since it works straight from the front of the list, it doesn't have to recurse to the end of the list first like foldl.
* "compose calls the second function and then the first function."
* "Maps - It can hold basic datatypes."
* "foldRight Is the same as foldLeft except it runs in the opposite direction."
I'd recommend friends to buy a good, well-edited book.