f: A -> B
g: B -> C
(f . g): A -> C
Function composition:
Just pass an output of f into input of g
f: A -> List[B]
g: B -> C
(f ? g): ?
How do you compose that?
And what will it return?
f: A -> B :: throws Exception
g: B -> C
(f ? g): A -> Safe[C]
How do you compose them in a safe way?
f: A -> B :: returns null sometimes
Pass the result to g only if it is not null and there are no exceptions
Challenge 1