Skip to content

Evaluate the iife produced by pa macro when used with p #3

@devanshj

Description

@devanshj
import { p, pa } from "@sthir/macro"

pa(x, p("!==", undefined))

Gets transformed to...

(t => t !== undefined)(x)

This is correct because pa could have even be used with some other predicate not just p...

pa(x, somePredicate)

But in cases where it's used with p the iife can be further evaluated....

x !== undefined

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions