16 May
2004
16 May
'04
12:54 p.m.
Dylan Thurston said:
By the way, are nested regular expression matches allowed? Something like:
foo :: [[Int]] -> Int foo [/ _* [/ 5* a 6* /] _* /] = a
Yep.
? If so, what is the type of a in
foo [/ _* [/ 5* a* /]* _* /]
It would be [[Int]] because of the fact that [/ 5* a* /] alone would have type [Int] and therefore in that case a would also have type [Int]. Repeating this would cause it to have type [[Int]]. /Andreas -- Andreas Farre some cannot be created more equal than others