Changes
1 changed files (+3/-3)
-
-
@@ -15,12 +15,12 @@ def PrintfType : Fmt → Type 1| .FChar _ fmt => PrintfType fmt | .FEnd => PLift String def printf (fmt : String) : PrintfType <| toFmt <| fmt.toList := def printf (fmt : String) : PrintfType <| toFmt fmt.toList := let rec printfAux (fmt : Fmt) (acc : List 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) [] printfAux (toFmt fmt.toList) [] #eval printf "Hello * *" 42 "Meow" |>.down #eval printf "Hello * * *" (-1) [42, 69] "Meow" |>.down
-