Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

isNode

import { isNode } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/free.ts";

Check if a Free structure is a Node.

@example
import { isNode, node, link } from "./free.ts";

const single = node(1);
const combined = link(node(1), node(2));

console.log(isNode(single)); // true
console.log(isNode(combined)); // false
function isNode<A>(ua: Free<A>): ua is Node<A>;
§
isNode<A>(ua: Free<A>): ua is Node<A>
[src]

§Type Parameters

§Parameters

§Return Type

§
ua is Node<A>
[src]