Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why not simplify ->string into displaying into a string write port? #1

Open
kakafarm opened this issue Jun 14, 2024 · 2 comments
Open

Comments

@kakafarm
Copy link

kakafarm commented Jun 14, 2024

(define ->string

Why not simplify ->string into displaying into a string write port?

It could be:

(define (->string x)
  (let ((out (open-output-string)))
    (display x out)
    (get-output-string out)))
@KikyTokamuro
Copy link
Owner

Hello @kakafarm!
Yes, you are right, in principle it can be replaced with a simpler implementation of this function.
You could submit a pull request and I will accept it.

@kakafarm
Copy link
Author

Hello @kakafarm! Yes, you are right, in principle it can be replaced with a simpler implementation of this function. You could submit a pull request and I will accept it.

I am trying my luck at modernising this code in https://codeberg.org/kakafarm/guile-pstk/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants