Towers of Hanoi: Difference between revisions

m (→‎{{header|REBOL}}: Remove vanity tags)
Line 1,648:
=={{header|Groovy}}==
Unlike most solutions here this solution manipulates more-or-less actual stacks of more-or-less actual rings.
<lang groovy>def tail = { list, n -> def m = list.size(); list[.subList([m - n, 0].max(),m)..<m] }
 
final STACK = [A:[],B:[],C:[]].asImmutable()
Anonymous user