Posted to tcl by Guest86 at Fri Dec 19 01:27:52 GMT 2025view raw

  1. set P \
  2.  
  3. {L\ n {expr {$n?[P [lmap i $L {incr t $i}] [expr $n-1]]:$L}}}
  4.  
  5.  
  6. lmap L\ n {
  7. {-3 4 7 -1 15} 1
  8. {-3 4 7 -1 15} 3
  9. } {
  10. puts "\[$L\] $n :\n[apply $P $L $n]\n"
  11. }

Add a comment

Please note that this site uses the meta tags nofollow,noindex for all pages that contain comments.
Items are closed for new comments after 1 week