News for hackers. Stuff that matters.
Re:Why Does “=” Mean Assignment? by icebraining on Tuesday April 10, 2018 @04:08PM (#16804815)
Prolog's unification:

  X = Y,
  X = 5,
  %% Y = 5 now as well
--

  ?- append([1,2], Y, [1,2,3]).
  Y = [3].
Re:Why Does “=” Mean Assignment? by OskarS on Tuesday April 10, 2018 @05:05PM (#16805418)
Yeah, Prolog's unification operator really blows your mind the first few times you experience it. You left the best part out of that last example:

    ?- append(X, Y, [1,2,3]).
    X = [],
    Y = [1, 2, 3] ;

    X = [1],
    Y = [2, 3] ;

    X = [1, 2],
    Y = [3] ;

    X = [1, 2, 3],
    Y = [] ;

    false.
(a few newlines added for clarity)