The largest n-tuple in Lisp
CL-USER 17 : 8 > (defun double (x) (* x 2)) DOUBLE
Having fed this to Lisp, we can call double in other functions, or from the top level:
CL-USER 18 : 8 > (double 1) 2
CL-USER 18 : 8 > (double 2) 4
CL-USER 18 : 8 > (double 4) 8
I experimented and realised that this works with triple too :
CL-USER 21 : 8 > (defun triple (x) (* x 3)) TRIPLE
CL-USER 22 : 8 > (triple 3) 9
CL-USER 23 : 8 > (triple 6) 18
CL-USER 24 : 8 > (triple 1) 3
This works for quadruple too: I can define a function called quadruple which returns four times its argument :
CL-USER 25 : 8 > (defun quadruple (x) (* x 4)) QUADRUPLE
CL-USER 26 : 8 > (quadruple 4) 16
CL-USER 27 : 8 > (quadruple 8) 32
CL-USER 28 : 8 > (quadruple 16) 64
Works for quintuple too ! :
CL-USER 9 : 2 > (defun quintuple (x) (* x 5)) QUINTUPLE
CL-USER 10 : 2 > (quintuple 4) 20
CL-USER 11 : 2 > (quintuple 5) 25
I then tried a far larger n-tuple : centuple and it works as well !
CL-USER 12 : 2 > (defun centuple (x) (* x 100)) CENTUPLE
CL-USER 13 : 2 > (centuple 6) 600
CL-USER 14 : 2 > (centuple 8) 800
Later on, I realised that there is no limit and you can in fact define n-tuples even up to sextillion in Lisp!