Tartanicide Mind Eraser:
FLASHING LIGHTS WARNING
(watch with no intention other than to feel a kind of MENTAL SCRAMBLING "vibration" - focus on this feeling as your subconscious is adjusted)
(kasten)
;; Define a tuple constructor
(define (make-tuple x y z w)
(list x y z w))
;; Accessor functions
(define (tuple-x t) (list-ref t 0))
(define (tuple-y t) (list-ref t 1))
(define (tuple-z t) (list-ref t 2))
(define (tuple-w t) (list-ref t 3))
;; Predicate to check if it's a vector (w = 0)
(define (vector? t)
(= (tuple-w t) 0))
;; Predicate to check if it's a point (w = 1)
(define (point? t)
(= (tuple-w t) 1))
;; Create the tuple
(define a (make-tuple 43 -42 31 0))
;; Test outputs
(display "a.x = ") (display (tuple-x a)) (newline)
(display "a.y = ") (display (tuple-y a)) (newline)
(display "a.z = ") (display (tuple-z a)) (newline)
(display "a.w = ") (display (tuple-w a)) (newline)
(display "a is a vector: ") (display (vector? a)) (newline)
(display "a is a point: ") (display (point? a)) (newline)
(but EZ and 3D)
obviously:
impossible - an asymmetrical dice game
one player (the âmagicianâ) sets the âdifficultyâ of all tasks
the other players âattempt thingsâ
when something is âattemptedâ the âmagicianâ will judge the result by rolling a six-sided die some indeterminate number of times
the rule is this:
roll the die repeatedly and add the results
if the first roll is a number N then the âattemptâ is the sum of all subsequent rolls ending in the Nth rolled â1â
the âattemptâ is not technically a number since the summation is not guaranteed to terminate, but in practice it will be a number (possibly a very large one)
an âattemptâ strictly greater than the âdifficultyâ means that the player âsucceedsâ
anything else is a âfailureâ
these rules ensure that any âattemptâ may âsucceedâ or âfailâ based on the randomness of the dice regardless of the chosen value for the âdifficultyâ
the âdifficultyâ is a âcounting numberâ (but never zero)
if you as the âmagicianâ donât know what the âdifficultyâ should be then you can just choose â42â
but feel free to make things âimpossibleâ by setting a ridiculously high âdifficultyâ
https://rosettacode.org/wiki/Category:Zoea
mergesort: https://0x.co/DS3SKM