Search found 27 matches

by manyone
Dec 30th, '17, 03:41
Forum: Extending GP
Topic: myZip and myZipWith functions ala haskell
Replies: 8
Views: 4608

Re: myZip and myZipWith functions ala haskell

yes, i did, using myZip, myZipWidth and a couple of helper functions. and it validated 1234567812345670 and 49927398716 (fake numbers, of course) as good credit card numbers. i hesitate to upload the program because the problem is a perfect exercise for programmers learning a new language. taking 49...
by manyone
Dec 21st, '17, 04:54
Forum: Extending GP
Topic: myZip and myZipWith functions ala haskell
Replies: 8
Views: 4608

Re: myZip and myZipWith functions ala haskell

thanks for the advice - it's much simpler now.
myzipwith copy.jpg
here's the updated source:
myZipWith.gpp
(5.98 KiB) Downloaded 189 times
by manyone
Dec 15th, '17, 04:11
Forum: Bugs
Topic: stop doesnt stop - it's more like pause. is this normal
Replies: 2
Views: 2206

stop doesnt stop - it's more like pause. is this normal

i built a 'when space pressed, STOP' block but it doesnt seem to work - either in the development mode or even the exported app. it seems to act like a no-operation or short pause. replacing it with HALT, will work, though. im running this in windows 10. is there something i'm missing?
by manyone
Dec 12th, '17, 07:33
Forum: Extending GP
Topic: myZip and myZipWith functions ala haskell
Replies: 8
Views: 4608

myZip and myZipWith functions ala haskell

when i learned about GP, i immediately tried to use it to encode the luhn algorithm that checks for good credit card numbers- but soon learned that GP did not have a zipWith function! so i wrote my own version. ( in haskell, zipWith (*) [2,3,4] [5,4,6] would return a list of [10,12,24].) zipwith cop...
by manyone
Dec 11th, '17, 04:09
Forum: Experience Reports
Topic: [browser]Solving ProjectEuler #19
Replies: 1
Views: 2137

Re: [browser]Solving ProjectEuler #19

i did it too - to practice coding in gp blocks . it was fun! i got the right answer using all the info supplied. while i was there i also solved the easy (to me!) ones: multiples of 3 and 5 https://projecteuler.net/problem=1 , sum square difference https://projecteuler.net/problem=6 and number lette...
by manyone
Dec 11th, '17, 03:52
Forum: Requests
Topic: how about a comment block that can contain also commands
Replies: 1
Views: 1400

how about a comment block that can contain also commands

i would use it to "comment out" intermediate debugging code, for example.
it can also serve as a garbage bag for sticking unused objects floating in workspace because they were dislodged, or they were trying out temporary code, etc, then when you've collected enough, just drag it out to delete.
by manyone
Nov 21st, '17, 07:59
Forum: Working with GP
Topic: is reduce same as haskell foldl?
Replies: 1
Views: 2013

is reduce same as haskell foldl?

i've proven that reduce can perform sum as shown below
foldsum.png
but i cannot get this reduce to reverse the list
folderr.png
isn't reduce the equivalent of haskell's foldl?