Skip to content

Commit

Permalink
Minor formatting tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
lsgunnlsgunn committed Feb 24, 2025
1 parent d7def79 commit 101ff6a
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
3 changes: 2 additions & 1 deletion docs/builtins/General/cond.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## cond

`cond` is our macro for multiple branching conditional expressions. It allows you to do a multiway if expression in a more concise manner.
Use `cond` to evaluate multiple branching conditional expressions.
This function allows you to evaluate a series of `if` expression in a more concise manner.

### Basic syntax

Expand Down
5 changes: 2 additions & 3 deletions docs/builtins/General/do.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## do

`do` is a special form for evaluating a sequence of expressions and returning the last one as the result
Use `do` to evaluate a sequence of expressions in order and only return the result from the last expression.

### Basic syntax

Use the following syntax:

```pact
(do (my-expression1) (my-expression2) (my-return-exrepssion))
(do (my-expression1) (my-expression2) (my-return-expression))
```

### Examples
Expand All @@ -25,5 +25,4 @@ pact> (do (enforce false "boom") (+ 1 2))
(interactive):1:4: boom
1 | (do (enforce false "boom") (+ 1 2))
| ^^^^^^^^^^^^^^^^^^^^^^
```
10 changes: 7 additions & 3 deletions docs/builtins/General/hash-poseidon.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
## hash-poseidon
Use `hash-poseidon` to compute the Poseidon Hash Function. Note: This is a reference version of the Poseidon hash function.

Use `hash-poseidon` to compute the Poseidon Hash Function.
Note that this is a reference version of the Poseidon hash function.

### Basic syntax

To compute the Poseidon Hash Function using the reference version, use the following syntax:

`(hash-poseidon i j k l m n o p)`
```pact
(hash-poseidon i j k l m n o p)
```

### Arguments

Use the following arguments to specify the inputs for computing the Poseidon hash using the `hash-poseidon` Pact function.

| Argument | Type | Description |
| --- | --- | --- |
| `i`, `j`, `k`, `l`, `m`, `n`, `o`, `p` | `integer` | Specifies the inputs for the Poseidon hash function. |
| `i`, `j`, `k`, `l`, `m`, `n`, `o`, `p` | integer | Specifies the inputs for the Poseidon hash function. |

### Return value

Expand Down
1 change: 1 addition & 0 deletions docs/builtins/General/list-module.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ To list the modules deployed and available for loading, use the following syntax
```pact
(list-modules)
```

## Arguments

The `list-modules` function takes no arguments.
Expand Down
2 changes: 1 addition & 1 deletion docs/builtins/General/negate.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Use the following argument to specify the value for negation.

### Return value

The `negate` function returns the negation of the specified `value`
The `negate` function returns the negation of the specified `value`.

### Examples

Expand Down
4 changes: 2 additions & 2 deletions docs/builtins/Time/time.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Use the `time` function to construct a time object from a UTC value using the IS

The UTC format is the default time format in Pact for all time-related functions.
Internally, the time object supports up to microsecond resolution.
However, the values returned from the Pact interpreter as JSON are serialized using the default format.
However, the values returned from the Pact interpreter as JSON are serialized using the default format.
If you need higher resolution, you can explicitly format times with the `%v` template and related codes.

### Basic syntax
Expand Down Expand Up @@ -37,7 +37,7 @@ The following example demonstrates how to use the `time` function in the Pact RE
This example constructs a time object from the UTC value `"2016-07-22T11:26:35Z"`:

```pact
pact>(time "2016-07-22T11:26:35Z")
pact> (time "2016-07-22T11:26:35Z")
2016-07-22 11:26:35 UTC
```

Expand Down

0 comments on commit 101ff6a

Please sign in to comment.