justin․searls․co

Is Apple Shortcuts functional programming?

I'm working on an inadvisably complex Apple Shortcuts widget for studying Japanese language, and just realized two things that may save you some time in the future:

  1. If statements are expressions: the value of the "If Result" is available and evaluates to the final value of whatever branch was traveled at runtime
  2. Repeat blocks may say "each" but actually double as map functions: they return a "Repeat Results" value, which evaluates to a List of the final value of each iteration

Because Shortcuts exposes such a gobsmackingly-frustrating UI for actually building programs, it's easy to assume that you're hobbled by the conventions of something like BASIC, but there are some surprisingly modern conveniences lying under the surface!


Got a taste for hot, fresh takes?

Then you're in luck, because you'll pay $0 for my 2¢ when you subscribe to my work, whether via RSS or your favorite social network.

I also have a monthly newsletter where I write high-tempo, thought-provoking essays about life, in case that's more your speed:

And if you'd rather give your eyes a rest and your ears a workout, might I suggest my long-form solo podcast, Breaking Change? Odds are, you haven't heard anything quite like it.