The willSet observer seems to be as passive as the name suggests, unlike didSet:
willSet
didSet
class Eudaimonia { var aretē = 0 { willSet { print("Setting 'aretē' (= \(aretē)) to \(newValue).")
// You can try setting…
The authors of Haskell Book beautifully explain folding by tying it to the direct recursive patterns from previous chapters:
sum :: [Integer] -> Integer…
NOTE: This post is a work in progress.
Our Access News service has been using the Telephone Reader system for more than two…
(The examples and most of the definition itself is taken from Jared Smith’s…
The Phoenix Guides were good, but in a year since I’ve last looked at them, they’ve become even better! Currently reading Programming Phoenix ≥1.4, and…
struct TimesTables { subscript(m1: Int, m2: Int) -> Int { return m1 * m2 }}
var m = TimesTables()
guards allow to fail fast/return early and make checks more readable and more composable than using ifs.
guard
if
Instead of
if let a = optionalA { if let…
This post is a note to myself, but I would appreciate any comments (correction, advice, suggestions etc.). Thank you!
The Firebase Realtime Database’s security rules have predefined variables data and newData :
data
newData