A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
11
Task/Map-range/Common-Lisp/map-range.lisp
Normal file
11
Task/Map-range/Common-Lisp/map-range.lisp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(defun map-range (a1 a2 b1 b2 s)
|
||||
(+ b1
|
||||
(/ (* (- s a1)
|
||||
(- b2 b1))
|
||||
(- a2 a1))))
|
||||
|
||||
(loop
|
||||
for i from 0 to 10
|
||||
do (format t "~F maps to ~F~C" i
|
||||
(map-range 0 10 -1 0 i)
|
||||
#\Newline))
|
||||
Loading…
Add table
Add a link
Reference in a new issue