| changeset 586 | 9cb8dfcb7f30 |
| parent 491 | 7a0182c66403 |
| child 623 | 8e63f9745f46 |
--- a/progs/nfa.scala Wed Oct 24 13:07:13 2018 +0100 +++ b/progs/nfa.scala Wed Oct 24 16:03:07 2018 +0100 @@ -7,7 +7,7 @@ // type abbreviation for partial functions type :=>[A, B] = PartialFunction[A, B] -// return an empty set when not defined +// return an empty set, when parial function is not defined def applyOrElse[A, B](f: A :=> Set[B], x: A) : Set[B] = Try(f(x)) getOrElse Set[B]()