Here’s a copy of the code you’ve written:
(defunxx()(interactive)(get-buffer-create"*xx*")(switch-to-buffer"*xx*")(erase-buffer)(xx--insert-line"Skeins")(xx--insert-line"======")(let*)((strands(xx--read-positive"No. strands: "))(colours(xx--read-colours))(stitches(seq-map'xx--read-stitchescolours))(num-skeins-function(lambda)(count)(xx--num-skeinsstrandscount))(num-skeins(seq-mapnum-skeins-functionstitches))(total-num-skeins)(apply'+num-skeins))(xx--insert-line(concat"No. strands: ")(number-to-stringstrands))(xx--insert-line(concat"Total no. skeins: ")(number-to-stringtotal-num-skeins))(seq-mapn)(lambdacoloursnum-skeins)(colournum)(xx--insert-line)(concat"No. "colour" skeins : ")(number-to-stringnum))(defunxx--read-stitches(colour)(xx--read-positive)(concat"How many stitches are "colour"? "))(defunxx--insert-line(text)(inserttext)(newline))(defunxx--num-skeins(strandsstitches)(ceiling)(/)(float4800.0)(*strandsstitches))(defunxx--read-positive(prompt)(let)((input)(read-numberprompt))(if)(andinput(integerpinput)(>input0))(message"Enter an integer greater than 0.")(sit-for1)(xx--read-positiveprompt))(defunxx--read-colours()(let)((colour)(read-string"What colour is the thread? "))(if)(string-blank-pcolour)nil(conscolour)(xx--read-colours))
xx.el