UNPKG

@eagleoutice/flowr

Version:

Static Dataflow Analyzer and Program Slicer for the R Programming Language

12 lines (11 loc) 831 B
import type { NodeId } from '../../r-bridge/lang-4.x/ast/model/processing/node-id'; import type { DataflowGraph } from '../graph/graph'; import type { ReadOnlyFlowrAnalyzerContext } from '../../project/context/flowr-analyzer-context'; /** * Determines whether the function with the given id is a higher-order function, i.e., * either takes a function as an argument or (may) returns a function. * If the return is an identity, e.g., `function(x) x`, this is not considered higher-order, * if no function is passed as an argument. * Please note that inspecting higher order functions can be sped up (if queries multiple times) by providing an inverted graph as well! */ export declare function isFunctionHigherOrder(id: NodeId, graph: DataflowGraph, ctx: ReadOnlyFlowrAnalyzerContext, invertedGraph?: DataflowGraph): boolean;