DEV Community

Discussion on: Challenge: Parse simple and complex types from a string

Collapse
 
kspeakman profile image
Kasey Speakman

I am half-tempted to peak into the F# compiler source code, since it uses these exact type signatures and the Hindley-Milner type system. But it generates a syntax tree as the result. So the inner (Banana -> Grape) would become another expression tree.

Collapse
 
joelnet profile image
JavaScript Joel

Ya I'm sure they make an AST. That would have been too complex for this challenge. You are more than welcome to show is how it's done though! ;)

Collapse
 
kspeakman profile image
Kasey Speakman

Oh, not me. :o) I guess just pointing out another practical application. And the F# compiler is bootstrapped (written in F#).

Thread Thread
 
joelnet profile image
JavaScript Joel

I always love when a compiler is written with that language. Eat your own dog food!