Giter Site home page Giter Site logo

sublisp's Introduction

sublisp

Lisp without (most/some) parentheses

Do you also love lisp but even you get tired of all the parentheses, especially at the end of functions? Well here is the/a solution to that: sublisp! What it will do is replace all succcessive right parentheses with one parentheses and a subscripted count of all the successive parenthesis, See below example:

Before:

(define (fib n)
  (case n
    (0 0)
    (1 1)
    (true (+ (fib (- n 1)) 
             (fib (- n 2))))))
             
(define (fib-to n)
  (map (fn(x) (fib x)) 
       (sequence 1 n)))

After conversion:

(define (fib n)
  (case n
    (0 0)
    (1 1)
    (true (+ (fib (- n 1)₂ 
             (fib (- n 2)₆

(define (fib-to n)
  (map (fn(x) (fib x)₂ 
       (sequence 1 n)₃

Looks much better!

Script is written in newlisp, so you probably need to convert it in your favorite lisp dialect (which should support unicode). Would be great to see if someone actually hacks his evaluator & editor to support this without converting.

sublisp's People

Contributors

luxint avatar

Watchers

 avatar

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.