11# Introduction to Fable.Python
22
3- * Generated on 2025-12-22 13:26 UTC using Fable v5.0.0-alpha.21*
3+ * Generated on 2025-12-22 13:28 UTC using Fable v5.0.0-alpha.21*
44
55> This post is part of the [ F# Advent Calendar
66 2025] ( https://sergeytihon.com/2025/11/03/f-advent-calendar-in-english-2025/ ) . Thank you, Sergey Tihon, for organizing
@@ -3428,7 +3428,7 @@ module Utils =
34283428 "@alfonsogarciacaro"
34293429 "@ncave"
34303430 "@MangelMaxime"
3431- "@claude-code 🤖"
3431+ "@claude 🤖"
34323432 |]
34333433
34343434 /// Returns a random contributor from the list.
@@ -3469,8 +3469,8 @@ module Utils =
34693469
34703470 if endPos > start then
34713471 directive.Substring(start, endPos - start).Trim()
3472- |> fun s -> s .Split(',')
3473- |> Array.map (fun s -> s .Trim() )
3472+ |> _ .Split(',')
3473+ |> Array.map _ .Trim()
34743474 |> Array.filter (fun s -> s.Length > 0)
34753475 |> Array.toList
34763476 else
@@ -3539,7 +3539,7 @@ Parse lines into a document AST
35393539 lines
35403540 |> Seq.fold parseLine initial
35413541 |> flushState
3542- |> fun ctx - > List.rev ctx.Blocks
3542+ |> _.Blocks | > List.rev
35433543```
35443544
35453545### Transform Module
@@ -3562,7 +3562,7 @@ module Transform =
35623562 /// Filters standalone module/namespace declarations (e.g., "module Foo" or "namespace Bar")
35633563 /// but keeps module definitions with bodies (e.g., "module Foo =").
35643564 let private isBoilerplate (lines: string list) : bool =
3565- let code = lines |> String.concat "\n" |> (fun s -> s .Trim() )
3565+ let code = lines |> String.concat "\n" |> _ .Trim()
35663566
35673567 String.IsNullOrWhiteSpace code
35683568 || code.StartsWith "namespace "
@@ -3585,18 +3585,15 @@ module MarkdownPrinter =
35853585 /// Render a single block to markdown.
35863586 let private printBlock (block: Block) : string =
35873587 match block with
3588- | Markdown content -> content + " \n"
3588+ | Markdown content -> $"{content} \n"
35893589 | FSharpCode lines ->
35903590 let code = lines |> String.concat "\n" |> trimCode
3591- "\n```fsharp\n" + code + " \n```\n\n"
3592- | PythonCode content -> "\n```python\n" + content + " \n```\n\n"
3591+ $ "\n```fsharp\n{ code} \n```\n\n"
3592+ | PythonCode content -> $ "\n```python\n{ content} \n```\n\n"
35933593 | IncludePython symbols ->
35943594 // Unresolved - should have been transformed
35953595 let symbolList = String.concat ", " symbols
3596-
3597- "\n<!-- include-python: "
3598- + symbolList
3599- + " (unresolved) -->\n"
3596+ $"\n<!-- include-python: {symbolList} (unresolved) -->\n"
36003597 | Hidden _ -> "" // Should have been filtered
36013598
36023599 /// Render a document to markdown string.
0 commit comments