Giter VIP home page Giter VIP logo

Comments (3)

SeanTAllen avatar SeanTAllen commented on August 16, 2024 2

I'm not sure of your motivation, but I suspect that you can already do it using partial application:

primitive Foo
  fun hello(x: String): String =>
    "hello " + x

actor Main
  new create(env: Env) =>
    print_with_y(env.out, Foo~hello())
  
  fun print_with_y(stream: OutStream, f: {(String): String} val) =>
    stream.print(f("there"))

Runnable at the playground:

https://playground.ponylang.io/?gist=7ac613b68b129c7588e828e904fcbd03

from rfcs.

SeanTAllen avatar SeanTAllen commented on August 16, 2024

Can you provide some motivation for why this would be desirable? Every RFC should contain some motivation as to why it is desirable. Even requests.

Please note in case you are aware. Opening an issue such as this is a request for another human (other than you) to write up the full RFC so the more details you provide them, the better.

from rfcs.

damon-kwok avatar damon-kwok commented on August 16, 2024

Thanks @SeanTAllen
This is exactly what I wanted.
I am so sorry for this issue.

from rfcs.

Related Issues (20)

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.