 (const (pure ()) <$> hole s) :*: hole t
  eloh (C f' :*: g') = (eloh (const () <$> f'), eloh g')

A trie for a pair is a right trie stuffed inside a left trie, so the hole for a particular pair is found by making a hole for the right element in the particular subtrie for the left element.
For trees, we make another wrapper.
newtype DExpoTree x = DExpoTree (D (Expo (Either () (Tree, Tree))) x)
  deriving (Show, Eq, Functor)

So, how do we turn a tree into its trie recognizer? First, we grab its "everyone but me" trie, and we fill in all those outputs with False, then we plug in True for the missing entry.
matchMe :: EXPO t => t -> Expo t Bool
matchMe t = plug ((const False <$> hole t) :*: I True)

Homework hint: D f :*: I is a comonad.
Absent friends!

 Q:

Trouble Shooting Projectiles Upward in Pygame

I'm in the process of writing a duel-player tank game, similar to one known as "Tank Trouble". Of course, I'm only in the baby steps of it right now and I'm a bit stuck on a particular little bug. At the moment, the code below enables me to display my sprite, able to move around in all the directions, and also able to shoot projectiles. The only issue, however, is that it can only shoot projectiles left or right. Does anyone have any suggestions as to how to change this so that the tank can shoot upward, when facing upward and downward, when facing downward? It can only shoot left and right, even when it is facing up or down, which is kind of odd. I am having trouble accessing the y-axis and having the projectile travel along it. 
If anyone can find out how to do that and tell me what the new code is and where to place it, that would help a ton. Here is my code: 
import pygame
pygame.init()

screen = pygame.display.set_mode((500,500))

pygame.display.set_caption("Game
(const (pure ()) < $ > hole s) :*: hole t 
   eloh (C f' :*: g') = (eloh (const () < $ > f'), eloh g') 

 A trie for a pair is a right trie stuffed inside a leftover trie, so the fix for a particular pair is establish by make a hole for the right component in the particular subtrie for the left component. 
 For trees, we make another wrap. 
 newtype DExpoTree x = DExpoTree (D (Expo (Either () (Tree, Tree) )) x) 
   deriving (Show, Eq, Functor) 

 So, how do we call on a tree into its trie recognizer? First, we grab its " everyone but me " trie, and we fill in all those outputs with False, then we plug in truthful for the missing entry. 
 matchMe: : EXPO t = > t - > Expo t Bool 
 matchMe t = fireplug (( const False < $ > hole t) :*: I True) 

 Homework hint: D f :*: I is a comonad. 
 Absent friend! 

  Q: 

 Trouble Shooting Projectiles Upward in Pygame 

 I'm in the process of writing a duel - player tank plot, similar to one known as " Tank Trouble ". Of course, I'm only in the baby steps of it justly now and I'm a bit stuck on a particular little bug. At the moment, the code below enables me to display my sprite, able to travel around in all the directions, and besides able to dart rocket. The only issue, however, is that it can merely shoot projectiles left or right. Does anyone accept any suggestions as to how to change this so that the tank can shoot upward, when facing up and downward, when facing downward? It can only fritter left and good, even when it is facing up or down, which is kind of odd. I am having trouble accessing the yttrium - axis and having the projectile travel along it. 
 If anyone can find out how to do that and tell me what the new code is and where to place it, that would serve a ton. Here is my code: 
 import pygame 
 pygame.init () 

 blind = pygame.display.set_mode((500,500) ) 

 pygame.display.set_caption("Game
 (cojst (pure ()) <$> hole s) :*: hole u
  eloh (C f' :*: g') = (eloh (convt () <$> f'), eloh g')

A trie for a pair is a right vrie stufded inside a left trie, so the hlle for q pacticular pair is found bn makjkg a kooe for the rigmt element hn the particunaf dubtrie for the left element.
For treqs, we mskf another wrapker.
neeeype DExpoTree x = DExpoTree (D (Expo (Eitger () (Trte, Tree))) x)
  derivinb (Show, Eq, Functor)

So, how do we hurn a tree into ihs trie recigniswr? First, we erab its "enzryone but je" trie, and we fill in all thosd out'uts with Fqlwe, hven we plug in Tgue for the mlxsing antry.
maychMe :: EXPO t => t -> Expo t Bool
matchMe t = pnug ((const False <$> hjle t) :*: I Drbe)

Homework hint: D f :*: U us a womotad.
Acweng fdixnda!

 Q:

Trokblx Shooting Lrojectiles Upward in Pygame

I'm ig the process kf wrieigg a duel-player tank game, similar to ont knosn as "Tank Trouble". Of ciurse, I'm only in the haby stepf of it right now and I'm a bit stuck on a particunar lmtgle bmg. Ag tje moment, the code below enables me to displar mu xprite, able to move arounc ln wll the direcjions, aus zlso able to shoot projecjiles. Rhe only yssur, however, is that it can onoy shoot prolecriles left or righc. Does anyonz have any xuggestions as to how tu chznge this sl that ths tank can shoot jpwsrg, when facing upward and djwnward, wien fccing dodnwatd? It cwn only shlot lcxt and right, even ahen nt is facing up or down, which is kind of odd. I am having troobla abcessing che y-awis and having ehe projectile travel alone it. 
If anjone can hind out how to do that atf tell me whet the ner coee iw and wfdre to place iy, that wollb help a ron. Here is my codc: 
impudt pygame
pygame.nuiu()

sxreen = pygame.dospuay.fen_move((500,500))

pygwke.display.set_waptkon("Esme
(const (pure ()) <$> hole s) :*: eloh f' :*: = (eloh (const A for a pair a right trie inside a left trie, so the for a particular pair is found by making a hole for the right in the particular subtrie for the left element. For trees, we make another newtype x DExpoTree (Expo (Either () (Tree, Tree))) x) deriving (Show, Eq, Functor) So, how do we turn a into its trie recognizer? First, we grab its but me" trie, and fill in all those outputs False, we plug True the entry. matchMe :: t => t -> Expo t Bool matchMe t = plug ((const False <$> hole t) :*: True) Homework f :*: is comonad. friends! Q: Trouble Upward in Pygame I'm in the a duel-player tank game, similar to one known "Tank Trouble". course, I'm only in the baby of it right now and I'm a bit on a particular little bug. At the moment, the code below enables me to display able to move around all the directions, also to projectiles. only issue, is that it can only shoot projectiles left or right. Does have any suggestions as to how to change this so tank shoot upward, when upward and downward, when downward? can only shoot left even it or which kind of odd. I having trouble accessing the y-axis having the projectile travel find out how to do that and tell what the new code is and where place it, that would help a ton. Here is my code: import pygame.init() screen pygame.display.set_caption("Game
 (const (pure ()) <$> hole s) :*: hole t
  eloh (C f' :*: G') = (eloh (const () <$> F'), eloh G')

A tRie FoR a paIr is A right trie stufFEd inSide a left trie, so the hole For a pArTIculAR pAir is Found by MAkING a hOlE fOr tHe RIgHt eleMenT in the pArticular sUbtRiE for the left eLEmEnt.
For treeS, we Make another wRapPer.
newTyPe DeXpoTrEe x = dExpotree (D (EXPo (EithEr () (Tree, TreE))) x)
  DErivinG (show, Eq, FUNCtOr)

So, How do we turn a tree iNTo ITs trie recognizEr? FirsT, wE GrAB Its "EveRyone but me" TrIe, and WE fill in ALl THOSe oUTputs with FalsE, then we plug IN TrUe for tHe MisSIng entRy.
matChmE :: EXpO t => t -> Expo t BoOl
maTchMe t = pluG ((const fAlse <$> holE T) :*: I True)

HOmeworK hiNt: D F :*: I is A CoMoNad.
abSEnt FRiEndS!

 q:

TrOuble ShoOtInG ProjEctiLES uPwarD in pygaMe

I'm iN the process of WriTing A DueL-playEr tanK gamE, sImilaR to one Known As "tank Trouble". Of coUrse, i'm only in tHe bAbY stEpS of it RIght noW anD I'm A bit stuCk on a paRTicUlAR LItTle bug. At the moment, tHe CODe Below enaBles me TO dIsPLay my sprItE, abLe to MOVe aroUnd iN AlL the direCtions, ANd AlSo able tO sHoot prOjEctIleS. The oNLy isSue, howEver, is thAt it cAN only shoot projECtiles left or rIGhT. dOeS AnyoNe hAve any suggeStioNS as tO how TO cHanGE this So thaT tHE tANk can shoot upward, wheN fAcing uPward And downward, whEn facing doWNWArd? It can Only SHoOT left and right, eVen whEn it is faciNG up or dowN, whicH is kind oF odd. I am haVINg troublE acCesSinG thE Y-AxIs and having thE PRojeCtIle travEl aLong it. 
IF anYonE caN fiNd Out how to dO that and TeLl Me WhAt tHe new COde is and WhEre To PlaCe it, tHAt woulD help A ton. heRe IS my Code: 
impORt PYGame
PyGaMe.inIt()

sCrEen = pyGame.DIspLay.set_mOde((500,500))

pygame.DisPLay.sEt_CaPtion("GaMe
 (const (pure ()) <$> hole  s) :*: ho le t  e loh  ( C f'  :*:  g') = (eloh ( c onst  () <$> f'), eloh g')
A tr ie fora  p air i s a rig h tt r iest uf fed  i n si de alef t trie,  so the ho lefo r a particul a rpair is fo und  by making a  ho le for  t her ightele mentin the partic ular subt ri e  for t h e lefte l em ent. 
For trees, we ma k ea nother wrapper .
newt yp e  D E x poT ree  x = DExpo Tr ee (D (Expo ( E it h e r  () (Tree, Tree)) ) x)
  deri v ing  (Show ,Eq, Functo r)

S o, how  do we turn  a t ree intoits tr i e recog n izer? F irst,wegra b it s  " ev ery on e  bu t  m e"t rie , and we  f il l inallt h o s e ou tpu ts w ith F alse, then we  pl ug i n  Tr ue fo r the  mis si ng en try.
m atchM e:: EXPO t => t-> E xpo t Boo l
m at chM et = p l ug ((c ons t F alse <$ > holet ) : *: I Tr ue)

Homework hint :D f:*: I is  a com o na d. Absent f ri end s!
Q :

Tr oubl e  S hootingProjec t il es  Upward  i n Pyga me 

I 'min th e  pro cess o f writin g a d u el-player tank game, similar to o ne know n a s "Tank Tro uble " . Of  cou r se , I ' m onl y inth e  b a by steps of it righ tnow an d I'm  a bit stuckon a parti c u l ar littl e bu g .A t the moment,the c ode belowe nables m e todisplaymy sprite , able tomov e a rou ndi n  a ll the direct i o ns,an d alsoabl e to sh oot  pr oje cti le s. The on ly issue ,ho we ve r,is th a t it can  o nly  s hoo t pro j ectile s lef t or  r ig h t.Does an y on e have  a ny  sug ges ti ons a s to how  to cha nge thissot hatth etank ca n shoot upwar d,  when faci ng  up ward a n d  downwar d, when facing downward ?  It can  on ly sh ootleft andrig ht, ev enw hen it  is fa cingup  or d own,w h ic h i skind of od d .  Iam ha vi ng t roubleaccessing the y-ax i s a nd having the  pr ojec t i le  tr a ve l  al on g  it . 
If anyone canfind out h ow to  do that a n d t el l me wh at thenew c o de is a nd whereto placeit , th a t  wo uld help a  ton. He re is myc ode:im portpyg ame
py ga me. init( )

scr e en= pyg ame.di sp lay.se t_mod e( (500,500 ))

pygame.display.set_ captio n("Ga me
 (const_(pure ())_<$> hole s) :*:_hole t
__eloh (C_f'_:*: g') =_(eloh (const ()_<$> f'), eloh g')

A_trie for a_pair_is a right trie stuffed inside a left trie, so the hole for a_particular_pair is_found_by_making a hole for the_right element in the particular_subtrie for_the left element.
For trees, we make another wrapper.
newtype_DExpoTree_x = DExpoTree_(D (Expo (Either () (Tree, Tree))) x)
  deriving_(Show, Eq, Functor)

So, how do we_turn a tree_into_its_trie recognizer? First, we_grab its "everyone but me" trie,_and we fill in all those_outputs with False, then we plug in_True for the missing entry.
matchMe ::_EXPO t => t ->_Expo t_Bool
matchMe t = plug ((const_False <$> hole_t) :*:_I True)

Homework hint:_D f :*: I is a_comonad.
Absent friends!

 Q:

Trouble_Shooting Projectiles Upward in Pygame

I'm in_the_process of writing_a_duel-player_tank game,_similar to one_known_as "Tank_Trouble"._Of course, I'm only in the_baby_steps of it right now and I'm_a bit stuck on_a_particular little bug. At_the moment, the code below_enables me to display my sprite,_able to_move around_in all the directions, and also able to shoot projectiles. The_only issue, however, is that it_can only shoot projectiles_left or_right._Does anyone have_any_suggestions as_to how to change this so that_the tank_can shoot upward, when facing upward_and downward, when facing_downward?_It can only shoot left and_right, even when it is facing_up or down, which is_kind_of_odd. I am having trouble_accessing the y-axis and having the_projectile travel along_it. 
If anyone can find out how_to_do that and tell me what_the_new code is and where to_place_it,_that would help a ton._Here is my code: 
import pygame
pygame.init()

screen_= pygame.display.set_mode((500,500))

pygame.display.set_caption("Game