19 lines
338 B
Plaintext
19 lines
338 B
Plaintext
' FB 1.05.0 Win64
|
|
|
|
Type CurriedAdd
|
|
As Integer i
|
|
Declare Function add(As Integer) As Integer
|
|
End Type
|
|
|
|
Function CurriedAdd.add(j As Integer) As Integer
|
|
Return i + j
|
|
End Function
|
|
|
|
Function add (i As Integer) as CurriedAdd
|
|
Return Type<CurriedAdd>(i)
|
|
End Function
|
|
|
|
Print "3 + 4 ="; add(3).add(4)
|
|
Print "2 + 6 ="; add(2).add(6)
|
|
Sleep
|