_ is not an identifier, it's a pattern that means "don't care". If you want to call isDigit on the first token, then you need to change e.g.

| _ :: rest -> if isDigit(_) ...

to

| t :: rest -> if isDigit(t) ...

that is, name the thing you are matching, so you can pass it as an argument to a function.

(Note also that you'll have to define isDigit before you can call it, and that you could use System.Char.IsDigit rather than define your own.)

By on 4/24/2010 3:21 PM ()

Thanks brianmcn!!!

Your answer works really well!

By on 4/25/2010 12:37 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper