Skip to content

Study the "wrong" Fractal #38

@favonia

Description

@favonia

There was a bug in the code before the major rewrite 147c8d9. It is a valid displacement algebra, though it's different from what's called "Fractal" on paper / in OCaml. The question is---what is it??? @cangiuli @TOTBWF

This was the "wrong" Fractal:

  _ᶠ_ : List  𝒟   List  𝒟   List  𝒟 
  [ x ] ᶠ [ y ] = [ x  y ]
  [ x ] ᶠ (y  ys) = (x  y)  ys
  (x  xs) ᶠ [ y ] = (x  y)  xs
  (x  xs) ᶠ (y  ys) = (x  y)  (xs ys)

This is the correct one:

  _ᶠ_ : List  𝒟   List  𝒟   List  𝒟 
  [ x ] ᶠ [ y ] = [ x  y ]
  [ x ] ᶠ (y  ys) = (x  y)  ys
  (x  xs) ᶠ ys = x  (xs ys)

However, the "wrong" one is a valid displacement algebra. What's this "wrong" one anyway?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions