include yc.yml program { include forindention.ysl function "hanoi" { param "n" param "from" param "dest" param "by" choose { when "$n=1" { | printf("move the plate from «$from» to «$dest»\\\\n"); } otherwise { call "hanoi", with("n", "$n - 1", "from", "$from", "dest", "$by", "by", "$dest") call "hanoi", with("n", 1, "from", "$from", "dest", "$dest", "by", "$by") call "hanoi", with("n", "$n - 1", "from", "$by", "dest", "$dest", "by", "$from") } } } main "" { call "hanoi", with("n", 5, "from", 1, "dest", 3, "by", 2) | return 0; } }