I'm pretty new to scala and still in the early days of learning. I was reading an article that had an example like so:
def example(_list: List[Positions], function: Position => Option[Path]): Option[Path] = _list match {...}
NB
- Position is a
(Int,Int)
- Path is a
List( Position )
From what I understand, this method will hold:
list of positions
Option[Path]
and will return Option[Path]
What I don't understand is how are we supposed to call this method?
I tried this:
example(Nil, Option( 0,0 ) )