Email or username:

Password:

Forgot your password?
Top-level
WimⓂ️

The second example shows the use of an algebraic data type, a tuple:

types {
Tup = Int Int MkTup
}

main {
6 7 MkTup (\ Int <- (x y MkTup): Tup . x y * )
print
}

MkTup creates a tuple of two integers. In Haskell this would be

data Tup = MkTup Int Int

The lambda function pattern matches on the type, so x and y bind to the stored values.

#Funktal

3 comments
WimⓂ️

Currently, there is no type checking. It's all very bare bones, an awful lot is still missing. There isn't even a compiler executable yet. But I think progress should be a bit faster now. #Funktal

Devine Lu Linvega

@wim_v12e I'd just like to say that postfix function declaration looks very nice. At a glance it looks like you're building a cocktail of factor and joy, and I'm here for it.

WimⓂ️

@neauoire 😊 The main difference with those languages is I think that I use the type system to create data structures.
Without the algebraic data types, it maps quite directly to Uxntal: the lambda arguments are just memory locations. And the postfix notation makes everything very easy.

Go Up