Skip to content

'easier-to-use interfaces for functions with numeric suffixes' #5

@m-bock

Description

@m-bock

As noted in the TODO section on the Readme:

Would this be the pattern?

-- | [p5js.org documentation](https://p5js.org/reference/#/p5/loadFont)
loadFont4 :: P5 -> String -> Maybe (Effect Unit) -> Maybe (Effect Unit) -> Font
loadFont4 p5 path callback onError = runFn4 loadFontImpl p5 path callback onError

-- | [p5js.org documentation](https://p5js.org/reference/#/p5/loadFont)
loadFont3 :: P5 -> String -> Maybe (Effect Unit) -> Font
loadFont3 p5 path callback = runFn4 loadFontImpl p5 path callback Nothing

-- | [p5js.org documentation](https://p5js.org/reference/#/p5/loadFont)
loadFont2 :: P5 -> String -> Font
loadFont2 p5 path = runFn4 loadFontImpl p5 path Nothing Nothing

Another way would be to omit the necessary first arg 'P5` in the counting :/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions