Chuks Programming Language Function Test Suite Released

Just shipped a 25 category function test suite for Chuks programming language. One file. One golden output. Every way you can write a function in the language, exercised end-to-end. Here's what's covered: → All arrow forms: expression body, block body, zero-param, single-param → Named declarations, anonymous expressions, IIFEs → Default & optional parameters → Function type annotations and arrow type annotations in param/return positions → Higher-order functions: compose, factories, twice → Closures: counter pattern, multi-var capture, mutable shared state via getter/setter pairs → Nested functions: 2-level and 3-level deep → Recursion: fib, sumTo → Generic classes & methods: Box<T>, map<U>, Pair<A,B> → Async functions with await → Class methods: chaining, closures from methods, static → Functions in data structures: arrays and maps of functions → Callbacks: .map(), .filter(), .reduce() using all function styles → Currying: 3-level chain → Void functions, mixed parameter types, functions as arguments This isn't just a test suite, it's a living spec. If you want to understand what Chuks functions look like, this file is the answer. Follow ChuksLang on X for more: https://lnkd.in/egzWUUmR Visit chuks.org to try Chuks #ProgrammingLanguages #Compilers #softwareEngineering #Chukslang #programming

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories