PasteRack.org
Paste # 51209
2020-11-18 03:07:11

Fork as a new paste.

Paste viewed 164 times.


Embed:

  1. #lang racket
  2.  
  3. (define (count-char c s) (count (curry equal? c) (string->list s)))
  4. (count-char #\0 "101001000111000")

=>

9