Wolfram Research

Function Repository Resource:

EnumerateCombinators

Source Notebook

Generate a list of all combinators with n symbols

Contributed by: Wolfram Research

ResourceFunction["EnumerateCombinators"][n]

generates a list of all combinators with n symbols.

ResourceFunction["EnumerateCombinators"][n,syms]

uses symbols from the list syms.

ResourceFunction["EnumerateCombinators"][n,syms,fun]

uses the function fun to combine the symbols.

Details and Options

ResourceFunction["EnumerateCombinators"][n] is equivalent to ResourceFunction["EnumerateCombinators"][n,{CombinatorS,CombinatorK}].
ResourceFunction["EnumerateCombinators"][n,syms] is equivalent to ResourceFunction["EnumerateCombinators"][n,syms,Construct].

Examples

Basic Examples (1) 

Generate all combinators with three symbols:

In[1]:=
ResourceFunction["EnumerateCombinators"][3]
Out[1]=

Scope (4) 

Use default symbols to represent the combinators:

In[2]:=
ResourceFunction["EnumerateCombinators"][3]
Out[2]=

Use s and k as the symbols:

In[3]:=
ResourceFunction["EnumerateCombinators"][3, {s, k}]
Out[3]=

Use Application to combine the symbols:

In[4]:=
ResourceFunction["EnumerateCombinators"][3, Application]
Out[4]=

Specify both the combinator symbols and the operator:

In[5]:=
ResourceFunction[
 "EnumerateCombinators"][3, {\[FormalS], \[FormalK]}, Application]
Out[5]=

Resource History

License Information