Git Product home page Git Product logo

combinator's People

Contributors

drupol avatar rehno-lindeque avatar renovate[bot] avatar zoomlogo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

combinator's Issues

Definition of Omega combinator

Hello,

not considering myself an expert I wonder whether the definition of the Omega combinator is correct.
Shouldn't it be like this?

Ω := MM = (λa.aa)λa.aa

That way Ω does not consume further arguments. The loop is entered when M takes M as an argument, right?

Ωx = MMx = ((λa.aa)λa.aa)x

Whereas

(λa.(aa)(aa))x = (xx)(xx)

takes one more argument and would terminate when x was I := λa.a for instance.

Accordingly, the JS expression for omega would be a function without arguments.

() => (a => a(a))(a => a(a))

I might be wrong.

Anyway, I was happy to come across your project.
Thanks for sharing it!

Cheers!

Feature request: add psalm type declarations (and push type inference)

Not sure if you are interested in this, but it is an interesting exercise, and good added value for downstream consumers.

Given (for example) combinator A:

$next = function (string $input) : int {
    return strlen($input); // simplistic example, ignore the fact that it is redundant
};

$a = new A($next, 'foo');

$a(); // int - can be inferred, in theory

This can be achieved via something like:

/**
 * @psalm-template XType
 * @psalm-template ResultType
 */
final class A extends Combinator
{
    /**
     * @psalm-param callable(XType) : ResultType $f
     * @psalm-param XType $x
     */
    public function __construct(callable $f, $x)
    {
        // ...
    }

    /** @psalm-return ResultType */
    public function __invoke()
    {
        // ...
    }

    /** @psalm-return callable() : ResultType */
    public static function closure(): callable
    {
        return static function (callable $f, $x) {
            return (new self($f, $x))();
        };
    }
}

This is currently tested in (for example) phpunit via some static analysis scripts: https://github.com/sebastianbergmann/phpunit/tree/619868463e06e5072c6e42dbae174d99cdd10fc2/tests/static-analysis

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

composer
composer.json
  • php >= 8.1
  • drupol/php-conventions ^5
  • friends-of-phpspec/phpspec-code-coverage ^6
  • infection/infection >= 0.26
  • infection/phpspec-adapter ^0.2
  • phpspec/phpspec ^7
  • phpstan/phpstan-strict-rules ^1.0
github-actions
.github/workflows/code-style.yml
  • actions/checkout v3
  • shivammathur/setup-php v2
  • ramsey/composer-install v2
.github/workflows/mutation-tests.yml
  • actions/checkout v3
  • shivammathur/setup-php v2
  • ramsey/composer-install v2
.github/workflows/prettier.yml
  • actions/checkout v3
  • cachix/install-nix-action v27
.github/workflows/prune.yaml
  • actions/stale v8
.github/workflows/release.yaml
  • actions/checkout v3
  • mindsers/changelog-reader-action v2
  • actions/create-release v1
.github/workflows/static-analysis.yml
  • actions/checkout v3
  • shivammathur/setup-php v2
  • ramsey/composer-install v2
.github/workflows/tests.yml
  • actions/checkout v3
  • WyriHaximus/github-action-composer-php-versions-in-range v1
  • actions/checkout v3
  • shivammathur/setup-php v2
  • ramsey/composer-install v2

  • Check this box to trigger a request for Renovate to run again on this repository

S2 combinator

Thanks for the great list!

I have a question regarding the S2 combinator. Is it the same as Curry's formalizing combinator Φ?
Because if it is, it should be λabcd.a(bd)(cd) instead of λabcd.a((bd)(cd)), like in the JS. I am asking because I have never seen the combinator λabcd.a((bd)(cd)) and would like to add it to my own list if it's a widely-used combinator.

Moony

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.