pil-4th icon indicating copy to clipboard operation
pil-4th copied to clipboard

Solutions to Exercises of Book Programming in Lua (Fourth Edition)

Results 6 pil-4th issues
Sort by recently updated
recently updated
newest added

``` -- Sure, if this is what you mean. function polyval (p, x) local sum, pow = 0, 1 for _, a in ipairs (p) do sum = sum +...

https://github.com/oitofelix/pil-4th/blob/417e4604cef776024c353fc1b3ae8652ffef3841/ex-4.6.lua#L11 This (and also in ex 4.4) should have the `-1` in the call to `utf8.offset` on the outside and not on the inside. Try this output and you will...

I'm a noob, just learning lua now but I noticed in your solution for 1.8 if I use the -l method to load the script it will only show lua...

I've noticed that the solution to Exercise 4.4 doesn't seem to work correctly. For example: insert("ação", 1, "!") --> a!ação (should be !ação) insert("ação", 3, "!") --> a!ão (should be...

Hi, I noticed that the current solution given for exercise 2.2 (change the 8-queens code to instead generate all permutations of the set {1, ...8} ) does not actually generate...