to potenz :x :n ifelse (:n > 1) [ output :x * (potenz :x (:n-1)) ] [ output :x ] end