hogen=[(x,y)|x<-[-n..n],y<-[-n..n]]]
How can I write this function without using list inclusion?
haskell
If you want to use the list as an application,
hogen=(\xy->(x,y))<$>[-n..n]<*>[-n..n]
If you want to use it as a monad
hogen=dox<-[-n..n]
y<-[-n..n]
return(x,y)
can be written as
578 Understanding How to Configure Google API Key
572 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
912 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
610 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.