ó
P'—^c           @   sr   d  d l  m Z d d l m Z d d d d g Z e e d „ Z e e d	 „ Z e e d
 „ Z e e d „ Z	 d S(   iÿÿÿÿ(   t   dequei   (   t
   is_seqcontt   tree_leavest   ltree_leavest
   tree_nodest   ltree_nodesc         c   s{   t  |  g g ƒ } xb | rv t | j ƒ  ƒ } xC | D]; } | | ƒ rj | j | ƒ | j | | ƒ ƒ Pq4 | Vq4 Wq Wd S(   s   Iterates over tree leaves.N(   R    t   itert   popt   append(   t   roott   followt   childrent   qt	   node_itert   sub(    (    s,   /tmp/pip-unpacked-wheel-WgnHs6/funcy/tree.pyR      s    	c         C   s   t  t |  | | ƒ ƒ S(   s   Lists tree leaves.(   t   listR   (   R	   R
   R   (    (    s,   /tmp/pip-unpacked-wheel-WgnHs6/funcy/tree.pyR      s    c         c   s{   t  |  g g ƒ } xb | rv t | j ƒ  ƒ } xC | D]; } | V| | ƒ r4 | j | ƒ | j | | ƒ ƒ Pq4 q4 Wq Wd S(   s   Iterates over all tree nodes.N(   R    R   R   R   (   R	   R
   R   R   R   R   (    (    s,   /tmp/pip-unpacked-wheel-WgnHs6/funcy/tree.pyR      s    	c         C   s   t  t |  | | ƒ ƒ S(   s   Lists all tree nodes.(   R   R   (   R	   R
   R   (    (    s,   /tmp/pip-unpacked-wheel-WgnHs6/funcy/tree.pyR   &   s    N(
   t   collectionsR    t   typesR   t   __all__R   R   R   R   R   (    (    (    s,   /tmp/pip-unpacked-wheel-WgnHs6/funcy/tree.pyt   <module>   s   