Draw a Koch curve. See details: Koch curve

 
{def koch 
 {lambda {:d :n}
  {if {< :n 1}
   then M:d
   else {koch {/ :d 3} {- :n 1}} T-60
        {koch {/ :d 3} {- :n 1}} T120
        {koch {/ :d 3} {- :n 1}} T-60
        {koch {/ :d 3} {- :n 1}} }}}
-> koch
 
{def K {koch 300 4}}
-> K
 
{svg {@ width="580" height="580" style="box-shadow:0 0 8px #000;"}
 {polyline  {@ points="{turtle 140 140 0 {K}}"  
               stroke="#f00" fill="transparent"}}
 {polyline  {@ points="{turtle 140 440 90 {K}}"  
               stroke="#0f0" fill="transparent"}}
 {polyline  {@ points="{turtle 440 440 180 {K}}"  
               stroke="#00f" fill="transparent"}}
 {polyline  {@ points="{turtle 440 140 270 {K}}"  
               stroke="#ff0" fill="transparent"}} 
}
 
The output is a "square of Koch" which can be seen in 
http://lambdaway.free.fr/lambdawalks/?view=koch
 