Curriculum Foundations Functions and expressions exercise 4 · fill-word
Functions and expressions
Fill the parameter type. The function adds one to a 32-bit signed integer.
TypeScript reference
Fill the blanks →
About this theme
Rust functions use explicit parameter and return types. Blocks can produce values, and the final expression has no semicolon. This is the first theme where a missing or extra semicolon changes meaning. Planned exercises: 1. choose fn syntax. 2. recognise -> return types. 3. choose final-expression return. 4. fill a parameter type. 5. fill a return type. 6. write a simple pure function. 7. write an if expression return. 8. translate TS helper functions. 9. fix a function where a semicolon accidentally returns ().