Skip to content

Commit 9c86e77

Browse files
committed
fix workflow
1 parent 6a8483d commit 9c86e77

3 files changed

Lines changed: 11 additions & 10 deletions

File tree

.github/workflows/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Build and Publish
22
on:
33
push:
44
branches: [ main ]
5+
permissions:
6+
id-token: write
7+
contents: read
58
jobs:
69
build:
710
runs-on: ubuntu-latest

docs/AsyncSeqExamples.fsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,16 +208,6 @@ let changes (key:Key, mi:ModifyIndex) : AsyncSeq<Value> =
208208
The function `changes` produces an async sequence which emits elements whenever the value corresponding to the key changes. Suppose also that we would like to trigger an operation
209209
whenever the key changes or based on a fixed interval. We can represent a fixed interval as an async sequence as follows:
210210
211-
*)
212-
213-
let intervalMs (periodMs:int) = asyncSeq {
214-
yield DateTime.UtcNow
215-
while true do
216-
do! Async.Sleep periodMs
217-
yield DateTime.UtcNow }
218-
219-
(**
220-
221211
Putting it all together:
222212
223213
*)

docs/ComparisonWithObservable.fsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ be synchronous `'T -> bool`:
4242

4343
open System
4444

45+
// At the top of docs/ComparisonWithObservable.fsx
46+
type Tweet = { Id: int; Content: string }
47+
let filterTweet (tweet: Tweet) = async { return tweet.Content.Contains("keyword") }
48+
let storeTweet (tweet: Tweet) = printfn "Storing tweet %d" tweet.Id
49+
4550
let tweetsObs : IObservable<Tweet> =
4651
failwith "TODO: create observable"
4752

@@ -96,6 +101,9 @@ filtered tweets. Again, we can adapt the function `storeTweet` defined above to
96101
observable of filtered tweets to it:
97102
*)
98103

104+
let storeTweet (tweet: Tweet) : Async<unit> =
105+
failwith "TODO"
106+
99107
let storedTweetsObs : IObservable<unit> =
100108
filteredTweetsObs'
101109
|> Observable.mapAsync storeTweet

0 commit comments

Comments
 (0)