You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
brag/yaragg-lib/yaragg/examples/01-equal.rkt

13 lines
188 B
Racket

3 years ago
#lang yaragg
8 years ago
## Equal numbers of 0 and 1s in a string.
##
## (Thanks to mithos28 for this one.)
equal : [zero one | one zero]
zero : "0" equal | equal "0"
one : "1" equal | equal "1"