3 ms·
See also: Racket's 2d syntax library: #lang 2d racket (require 2d/match) (define (subtype? a b) #2dmatch ╔══════════╦══════════╦═══════╦═════
by disconcision 8y ago
See also: Racket's 2d syntax library:
#lang 2d racket
(require 2d/match)
(define (subtype? a b)
#2dmatch
╔══════════╦══════════╦═══════╦══════════╗
║ a b ║ 'Integer ║ 'Real ║ 'Complex ║
╠══════════╬══════════╩═══════╩══════════╣
║ 'Integer ║ #t ║
╠══════════╬══════════╗ ║
║ 'Real ║ ║ ║
╠══════════╣ ╚═══════╗ ║
║ 'Complex ║ #f ║ ║
╚══════════╩══════════════════╩══════════╝)
https://docs.racket-lang.org/2d/index.html https://docs.racket-lang.org/2d/index.html
- ishi 8y agoThat's pretty cool! I've never seen a programming language that accepts ASCII art as valid code.
- disconcision 8y agothere are a few... asciidots for instance. the racket library above actually has (basic) editor support in dr racket though