Comment

Comment by scottmmjackson

But if you know R, you can change the behavior of operators.

    > oldPlus <- `+`
    > `+` <- function(e1, e2) {
    +     if (is.character(e1) && is.character(e2))
    +       paste(e1,e2,sep="")
    +     else
    +       oldPlus(e1,e2)
    + }
    > "hello" + "world"
    [1] "helloworld"

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton