This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aproducer.py | |
# | |
# Async Producer-consumer problem. | |
# Challenge: How to implement the same functionality, but no threads. | |
import time | |
from collections import deque | |
import heapq | |
class Scheduler: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nullable enable | |
using System; | |
using System.IO; | |
using System.Threading.Tasks; | |
namespace AsyncAwaitPlay | |
{ | |
class Program | |
{ | |
/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# aproducer.py | |
# | |
# Async Producer-consumer problem. | |
# Challenge: How to implement the same functionality, but no threads. | |
import time | |
from collections import deque | |
import heapq | |
class Scheduler: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ZERO = f => x => x | |
ONE = f => x => f(x) | |
TWO = f => x => f(f(x)) | |
THREE = f => x => f(f(f(x))) | |
FOUR = f => x => f(f(f(f(x)))) | |
FIVE = f => x => f(f(f(f(f(x))))) | |
SIX = f => x => f(f(f(f(f(f(x)))))) | |
SEVEN = f => x => f(f(f(f(f(f(f(x))))))) | |
EIGHT = f => x => f(f(f(f(f(f(f(f(x)))))))) | |
NINE = f => x => f(f(f(f(f(f(f(f(f(x))))))))) |
OlderNewer