Skip to content

Commit

Permalink
def, not entry.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Jul 10, 2024
1 parent 7426248 commit 031dc51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/polynomials.fut
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-- A polynomial of the *n*th degree comprises *n* coefficients and can
-- be evaluated at a specific value *x* as follows:

entry poly as x =
def poly as x =
f64.sum (map2 (*) as (map (x**) (map f64.i64 (indices as))))

-- [Horner's method](https://en.wikipedia.org/wiki/Horner%27s_method)
Expand All @@ -15,7 +15,7 @@ entry poly as x =

import "exclusive-scan"

entry horner as x =
def horner as x =
f64.sum (map2 (*) as (exscan (*) 1 (map (const x) as)))

-- In most cases, the additional overhead of manifesting the result of
Expand Down

0 comments on commit 031dc51

Please sign in to comment.