You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
An experimental programming language that steals features from all my favourite languages.
1. Function Definitions
Complex Lambda Functions
let complexLambda = (x, y) -> { let result = x * y; return result;};// Usage of lambda in a functionfunction calculate(input) -> { return complexLambda(input, input + 10);}
Lambda in Ternary Expressions
let lambdaTernary = (condition) -> { return condition ? (x -> x * 2) : (x -> x / 2);};// Usage examplelet result = lambdaTernary(true)(5);
Inline If-Else Ternary
let inlineTernary = if x > 10 then (x -> x * 2) else (x -> x - 5);let result = inlineTernary(12); // Should return 24
2. Class Declarations
Class with Lambda Style Methods
type MyClass { let value = 10; increase = (amount) -> { this.value += amount; }; decrease = (amount) -> { this.value -= amount; };}
Data Structures
data MyData { let attributeOne, let attributeTwo};let myDataInstance = MyData { attributeOne = "Value1", attributeTwo = "Value2" };
3. Control Structures
Lambda in For Loops
for i in range(0, 10) -> lambda (i) { print("Value: " + i);}
If Statement with Lambda
if (x > 5) -> { print("x is greater than 5");} else -> { print("x is less or equal to 5");}