Note: I am a total beginner to writing with Lua and I'm already struggling with installing Lua modules normally (something about VS Code not running the right code, I don't know, I'll ask over at StackOverflow). Hence, for the purposes of this question, please assume I am stupid and have never used a 'programming language' aside from LaTeX in my life.
For a teaching-school project, I've been asked to develop a resource to help school students work on their equation-solving skills. So I've decided to create a set of algorithmically (but randomly) generated equations with worked solutions, which would be generated and printed inside (well, in the .pdf) a TeX file at compilation. These .tex files would then be given freely to teachers to compile on their end. I've heard that Lua is good for this, as it's well integrated with LuaLaTeX and can easily be written as a separate code file and input with
\directlua{ code.lua }
My problem is that I really want to be able to access functions like map and functional-programming syntax from the LuaFun Library, but I'm really struggling even installing this on my own machine.
Since I want the .tex files to basically be 'plug and play' (assuming access to a proper TeX installation), this is way too much hassle & will prevent people from using my project. Instead, I want an easy way for me to access map etc., without every user having to have Lua and LuaFun already installed on their machine.
I tried copying fun.lua from the GitHub repo and just plain inputting that before my code, but that doesn't seem to work.
So what do I do? What's the best (read: simplest, most lightweight, and portable) way to do this?
Or is this this whole enterprise fundamentally flawed, and should I use somethhing like the python package?
Thanks in advance!
\directlua{require('fun.lua')}but other than that as you show no code or error hard to sa.exampackage ctan.org/pkg/exam-randomizechoices for example has a relevant name (I haven't tried it) or search this site for random question has over 700 hits