Skip to main content

Timeline for Write a function

Current License: CC BY-SA 4.0

4 events
when toggle format what by license comment
Jul 7, 2019 at 17:42 comment added Lukas Lang @Roman I've considered adding the zero byte version, but in the end I felt like that's even more questionable: this actually creates the symbol Global`f, while the empty version doesn't do that (you could argue that Null is assigned to %1, but Null is a built-in "function"). But as I've noted in the answer, whether the one byte solution is valid is also not entirely clear...
Jul 7, 2019 at 17:10 comment added Roman If this solution is acceptable, then the zero-byte answer is just as good: your "definition" of f doesn't do anything (apart from remembering "I've seen f") and can be left out. You can call f[] nonetheless, still returning unevaluated f[]. However, in any case you're mostly playing tricks with the pattern-replacer and not instructing to evaluate a function.
Jul 7, 2019 at 9:24 comment added moltarze Hey, it can be called, and the return value is optional. This counts.
Jul 7, 2019 at 9:11 history answered Lukas Lang CC BY-SA 4.0