Changes
1 changed files (+4/-4)
-
-
@@ -16,11 +16,11 @@ def PrintfType : Fmt → Type 1| .FEnd => PLift String def printf (fmt : String) : PrintfType <| toFmt fmt.toList := let rec printfAux (fmt : Fmt) (acc : List Char) : PrintfType fmt := let rec printfAux (fmt : Fmt) (acc : Array Char) : PrintfType fmt := match fmt with | .FArg fmt => fun x ↦ printfAux fmt <| acc ++ (toString x).toList | .FChar c fmt => printfAux fmt <| acc ++ [c] | .FEnd => .up acc.asString printfAux (toFmt fmt.toList) [] | .FChar c fmt => printfAux fmt <| acc.push c | .FEnd => .up acc.toList.asString printfAux (toFmt fmt.toList) #[] #eval printf "Hello * * *" (-1) [42, 69] "Meow" |>.down
-