Spreadsheet Institute

Home of Spreadsheet Lisp (SL)



    DEFINE(
        FLIPCOIN,
        LAMBDA(
            [times],
            LET(
                _times,
                    MAYBENOT(times, 1),
                IF(
                    LTE(_times, 1),
                    COINTOSS(),
                    VSTACK(
                        COINTOSS(),
                        FLIPCOIN(DECREMENT(_times)))))))