← Back to context

Comment by cess11

1 day ago

There is code, search for 'examples'.

It concludes by implementing a fold:

   define
   {
       [Fold]<- {
           rearrange
           {
               rearrange
               {
                   dequote
                   choose
                   quote Result
                   pair pair pair {[Fold]<-} Function Result Remainder
                   Remainder
               }
               {Result Remainder}
               dequote Function Base <-[terms] Source
           }
           {Function Base Source}
        }
   }
   {
       [Fold]<- {[literal]<-} {} {1 2 3}
   }

great example! as someone who writes a Fold function every day, this explains the power of the language very well. ;)

  • i'm really not trying to be snarky or anything, but right at the top of the om page it describes the language as concatenative and homoiconic. without searching that or asking an llm, do you know what those terms mean? or what fold is?

    could be there's nothing wrong with the page and you're really just not the audience for it. hacker news has many currents, most of which don't interest me, and that's fine, i don't feel the need to weigh in on everything.

  • As is clearly explained on the web page, this is not a programming language for everyday tasks, it's an early stage proof of concept that can be used to explore how computer science might be expressed in unusual ways.

    Implementing fold would be something of a milestone in such a language.