Skip to content

Instantly share code, notes, and snippets.

@elderica
Created December 7, 2023 12:47
Show Gist options
  • Save elderica/92a172504f2681220258d79fcea2990d to your computer and use it in GitHub Desktop.
Save elderica/92a172504f2681220258d79fcea2990d to your computer and use it in GitHub Desktop.
ドドスコ
#lang racket
(define (take-upto length lst)
(cond
[(<= length 0) null]
[(null? lst) null]
[else (cons (first lst)
(take-upto (sub1 length) (rest lst)))]))
(define (ddsk)
(letrec ([rec (lambda (history)
(if (equal? history (list 1 1 1 0 1 1 1 0 1 1 1 0))
(displayln "ラブ注入♡")
(let ([i (random 2)])
(display (vector-ref (vector "ドド" "スコ") i))
(rec (take-upto 12 (cons i history))))))])
(rec null)))
(ddsk)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment