# HG changeset patch # User William Morgan # Date 1376254115 25200 # Node ID 0f8adc187d29a345874929cd224d7fe0ed3b2828 # Parent 0ea0bae24173e0589acbe0ea094013303f524c0e allWithMaxSize seems to work, will clean next commit diff -r 0ea0bae24173 -r 0f8adc187d29 src/bv.tp --- a/src/bv.tp Sun Aug 11 05:55:28 2013 -0700 +++ b/src/bv.tp Sun Aug 11 13:48:35 2013 -0700 @@ -518,6 +518,18 @@ allOfSize: size inFold?: 0 withOps: ops } + allWithMaxSize <- :size { + res <- #[] + n <- 3 + while: {n <= size} do: { + foreach: (allOfSize: n) :idx el{ + res append: el + } + n <- n + 1 + } + res + } + filterTrees <- :trees strops { filtered <- #[] ops <- strops fold: 0 with: :acc el { @@ -557,7 +569,18 @@ } } - main <- :args { + main <- { + prog <- program + trees2 <- prog allWithMaxSize: 4 + foreach: trees2 :idx tree { + prog root!: tree + test: prog + } + //print: trees2 + 0 + } + + mmain <- :args { //test: (program gentestprog) //test: (program exampleprog) size <- 3 @@ -582,7 +605,7 @@ trees <- (prog allOfSize: size) } foreach: trees :idx tree { - prog root! tree + prog root!: tree test: prog } } @@ -590,3 +613,4 @@ } } } +