alvin alexander
Nodes for the term “function”
Java: How to square a number
Read more
A Scala 3 function that counts the number of vowels in the String it is given as input
Read more
ScalaTest: How to print debug output in tests (to STDOUT)
Read more
Kotlin sortedWith syntax and lambda examples
Read more
Dart: How to pass a function into a function (using a Function as a method parameter)
Read more
Martin Fowler on lambdas, circa 2004
Read more
Scala if then else syntax (and returning a value from an if statement)
Read more
Using the Scala Option, Some, and None idiom (instead of Java null)
Read more
Scala varargs syntax (and examples)
Read more
Scala: A Reverse Polish Notation (RPN) calculator written with foldLeft
Read more
A Scala method to run any block of code slowly
Read more
Passing a block of code to a function in Scala (callbacks)
Read more
Scala List/Array/Vector/Seq class filter method examples
Read more
Scala method and function examples
Read more
An @impure annotation for functional programming in Scala
Read more
Scala functions to repeat a character n times (blank padding)
Read more
How to define Scala methods that take complex functions as parameters (syntax)
Read more
Scala: “IO monad doesn’t make a function pure; it just makes it obvious it’s impure”
Read more
Kotlin functions to create Lists, Maps, and Sets
Read more
Implicit methods/functions in Scala 2 and 3 (Dotty extension methods)
Read more
My Scala Sed project: More features, returning strings
Read more
Explaining Scala’s `val` function syntax
Read more
How to use partially applied functions in Scala
Read more
Expanding on Adam Warski’s flatMap example (Set, case statements, function literal)
Read more
Scala: What do “effect” and “effectful” mean in functional programming?
Read more
Scala: Passing a function literal as a function argument
Read more
Functional error handling in Scala (video)
Read more
Scala: How to use ‘fold’ on an Option (syntax, examples)
Read more
Scala 3: Functions: Options and Functional Error Handling (Part 1)
Read more
Some Scala Exception ‘allCatch’ examples
Read more
Scala: Using functional programming to improve a method
Read more
A Java method that returns a random boolean value based on a probability
Read more
Functional programming: Math functions, not programming functions
Read more
A guide rope for functional programming (Mary Rose Cook)
Read more
“Pure functional programming is programming with mathematical functions”
Read more
How to define a default value for a method parameter that is a function
Read more
Scala: Standard style of using parentheses when calling procedures
Read more
Scala functions: Named arguments and default arguments
Read more
Flutter: Using the url_launcher’s onLinkTap method (example, syntax)
Read more
My Flutter/Dart string utilities functions
Read more
Flutter/Dart: A few ways to simulate slow-responding functions and methods
Read more
Flutter/Dart: How to use async code inside a non-async method (like initState)
Read more
Dart Map class forEach method examples
Read more
Dart lists: A multiline map method example
Read more
A Dart function to get the current date/time in a “seconds since the epoch” format
Read more
Using a map function on a collection in a Play Framework template
Read more
Scala 3: How to search the Scaladoc with function signatures
Read more
A Dart function to return a random element from a list
Read more
Creating Play Framework template functions (examples)
Read more
How to define a Scala function reference in a Map
Read more
Morpheus teaches functional programming
Read more
An anonymous class example in Scala
Read more
Higher order functions *are* the Haskell experience
Read more
A Scala function to determine whether a number is a prime number
Read more
What is a “context parameter” in Scala 3 (Dotty)?
Read more
Scala for Java devs: Everything in Scala is an object
Read more
How to write a Java method that returns a generic type (syntax)
Read more
Scala: How to add new methods to existing classes
Read more
How to define a Scala method to take an implicit parameter
Read more
Gimp “Script-Fu” example (functions, parameters)
Read more
Simplify, simplify, simplify (programming Scala methods)
Read more
A Scala `for` loop as a method body
Read more
A Scala factorial recursion example
Read more
Perl code to read one line from a text file
Read more
Scala reduceLeft examples (Array, Vector)
Read more
AppleScript subroutines: how to create a subroutine
Read more
Why pure function signatures are more important than impure method signatures
Read more
AppleScript time example: The current time as hours and minutes
Read more
“Many functions in Lisp are list-eaters”
Read more
Fun with Scala functions (andThen and compose)
Read more
A Scala REST “get content” client function using Apache HttpClient
Read more
A JavaScript function to extract text from an anchor tag (using a regex)
Read more
Drupal watchdog function - How to log Drupal errors (error messages)
Read more
Scala FP idiom: Methods should not have side effects
Read more
Drupal 8: How to put a View or Block between the Content and Comments
Read more
AppleScript code to read file contents into a list (array)
Read more
Applying arguments to functions (currying)
Read more
Eliminating parentheses in Haskell with ‘$’
Read more
A Scala function to list subdirectories in a directory
Read more
Sometimes, the elegant implementation is just a function
Read more
How do I make variables private to my Perl function?
Read more
How to access arguments to a Perl subroutine or function
Read more
Perl delete - how to delete a file in a Perl script
Read more
How to use a Scala Set as a function predicate
Read more
Sencha ExtJS - How to properly use the Store load method
Read more
The truth about what Haskell functions return is spooky
Read more
Drupal 8 FAQ: What is the correct custom theme file name (preprocess functions)?
Read more
A Scala port of the Real World Haskell 'myDrop' function
Read more
What does '???' (three question marks) mean in Scala?
Read more
Sometimes the elegant implementation is a function
Read more
Proof in functions
Read more
What makes functional programming easy?
Read more
Scala - Using tuples in an anonymous function
Read more
A Drupal get user id function (uid)
Read more
Source code for an example Android 'send email' function/method
Read more
A Perl trim function
Read more
A PHP char_at function
Read more
CakePHP find conditions (plus find all, find list, and find count)
Read more
A CakePHP multiple layouts solution
Read more
A jQuery insert text example
Read more
PHP date validation
Read more
Apple makes me use a Microsoft keyboard
Read more
Perl substr example - How to extract a substring from a string
Read more
Perl - how to search a list of numbers with the grep function
Read more
Tue, Jul 17, 2007 (Fixed formatting of Function Point Analysis tutorial)
Read more
Perl subroutine values - How to return multiple values from a Perl function
Read more
A perl function that runs a Unix command and returns its exit status
Read more
An apology, and a good laugh
Read more
Ruby - Variable length argument lists with Ruby
Read more
Perl subroutine - how to return multiple values
Read more
Perl subroutines - a Perl subroutine (sub) tutorial
Read more
Design kata regarding Mac OS X Spaces
Read more
A Perl function to prompt users during interactive command-line input
Read more