Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
26
Task/Population-count/PicoLisp/population-count.l
Normal file
26
Task/Population-count/PicoLisp/population-count.l
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
(de popz (N)
|
||||
(cnt
|
||||
'((N) (= "1" N))
|
||||
(chop (bin N)) ) )
|
||||
|
||||
(println
|
||||
'pops:
|
||||
(mapcar
|
||||
'((N) (popz (** 3 N)))
|
||||
(range 0 29) ) )
|
||||
(setq N -1)
|
||||
(println
|
||||
'evil:
|
||||
(make
|
||||
(for (C 0 (> 30 C))
|
||||
(unless (bit? 1 (popz (inc 'N)))
|
||||
(link N)
|
||||
(inc 'C) ) ) ) )
|
||||
(setq N -1)
|
||||
(println
|
||||
'odio:
|
||||
(make
|
||||
(for (C 0 (> 30 C))
|
||||
(when (bit? 1 (popz (inc 'N)))
|
||||
(link N)
|
||||
(inc 'C) ) ) ) )
|
||||
Loading…
Add table
Add a link
Reference in a new issue