Sha256: f2103f72743d47b38180b9728bdca40b4914d94517b0d0354899c0fbba1702ec
Contents?: true
Size: 320 Bytes
Versions: 396
Compression:
Stored size: 320 Bytes
Contents
(defpackage #:binary (:use #:common-lisp) (:export #:to-decimal)) (in-package #:binary) (defun to-decimal (string) (loop with digits = (remove-if #'null (map 'list #'(lambda (c) (digit-char-p c 2)) string)) for idx below (length digits) and digit in (reverse digits) summing (* digit (expt 2 idx))))
Version data entries
396 entries across 396 versions & 1 rubygems