fun simpleBranching(count: Number, value:String = "") =
    if(count == 0) value
    else simpleBranching(count - 1, value ++ "Foo")

fun f(a: Array<String>, collect:String = "") =
    if(sizeOf(a) == 1)
        collect ++ a[0]
    else if(a[0] == "Clear")
        f(a[1 to -1])
    else
        f(a[1 to -1], collect ++ a[0])

fun g(a: Array<String>, collect:String = "") =
    using(empty = sizeOf(a) == 1, head = a[0])
        if(empty)
            collect ++ a[0]
        else if(head == "Clear")
            g(a[1 to -1])
        else
            g(a[1 to -1],  collect ++ head)


fun h(a: Array<String>, collect:String = "") =
      a match {
        case [] -> collect
        case [x ~ xs] ->
            if(x == "Clear") h(xs)
            else h(xs,  collect ++ x)
      }

var a = 1
fun z(param: Number) =
  if(param == 2)
      param
  else
      using(a = 2)
          z(a)



---
{
  a: simpleBranching(3),
  b: f(["Read", "Clear", "Read" , "Foo"]),
  c: g(["Read", "Clear", "Read" , "Foo"]),
  d: h(["Read", "Clear", "Read" , "Foo"]),
  e: z(3)
}
