Skip to content

Commit

Permalink
[the-art] heron.test.ts -- use currying
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Jun 10, 2024
1 parent 6c2634b commit 26f4d2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# the-art

[the-art] `heron.test.ts` -- use currying
[the-art] fix `definePrimitive`
[the-art] `examples/celsius/`

Expand Down
8 changes: 2 additions & 6 deletions src/the-art/examples/heron.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import assert from "node:assert"
import { test } from "node:test"
import { content, createCell } from "../cell/Cell.js"
import { content } from "../cell/Cell.js"
import { addContent } from "../cell/addContent.js"
import { heronStep } from "./heron.js"

test("heronStep", () => {
const x = createCell<number>()
const guess = createCell<number>()
const betterGuess = createCell<number>()

heronStep(x, guess, betterGuess)
const [x, guess, betterGuess] = heronStep()
addContent(x, 2)
addContent(guess, 1.4)

Expand Down

0 comments on commit 26f4d2c

Please sign in to comment.