Version 4 of 1liners

Updated 2007-02-28 09:20:12 by suchenwi

This tentative tcllib module contains code to win decisively any programming language shootout that aims for unreadable compact code. i.e. the notorious class of 1 Liners

 # 1liners.tcl
 #  $Id: 17768,v 1.5 2007-02-28 19:00:33 jcw Exp $
 # cprt: comp.lang.tcl.*
 # what: provide bragging tools for language shootouts.
 # what: 42
 # what: 

 # [http://groups.google.com/group/comp.lang.tcl/browse_frm/thread/facf8c58a9c7ab3]
 proc 42 {} {
     while {[gets stdin l]+1} {if {[append ($l) 1]==1} {puts $l}}
 }

 package provide 1liners 0.1
 # end


 # example:
 package require 1liners
 42
 # end

UK: To make it clear, this is purely experimental code, for use during daring participations in language shootouts ;-)

me fixed append $(l) to be append ($l) - what good is packaging if the contents aren't tested?


[ Category Package , a tentative part of Tcllib | Category Bragging Tools ]