Skip to content

Commit bcd19d3

Browse files
authored
Update lazy-evaluation.dd
1 parent e08e337 commit bcd19d3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/lazy-evaluation.dd

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ is possible in the D programming language using a delegate parameter:
9595
)
9696

9797
---
98-
void log(string delegate() dg)
98+
void log(const(char)[] delegate() dg)
9999
{
100100
if (logging)
101101
fwritefln(logfile, dg());
@@ -123,7 +123,7 @@ The functions then become:
123123
)
124124

125125
---
126-
void log(lazy string dg)
126+
void log(lazy const(char)[] dg)
127127
{
128128
if (logging)
129129
fwritefln(logfile, dg());
@@ -260,7 +260,7 @@ function:
260260
)
261261

262262
---
263-
Abc Enforce(Abc p, lazy string msg)
263+
Abc Enforce(Abc p, lazy const(char)[] msg)
264264
{
265265
if (!p)
266266
throw new Exception(msg());
@@ -280,7 +280,7 @@ template function:
280280
)
281281

282282
---
283-
T Enforce(T)(T p, lazy string msg)
283+
T Enforce(T)(T p, lazy const(char)[] msg)
284284
{
285285
if (!p)
286286
throw new Exception(msg());

0 commit comments

Comments
 (0)