function x = r8mat_l1_solve ( n, a, b )

%*****************************************************************************80
%
%% r8mat_l1_solve solves a unit lower triangular linear system.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 January 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of rows and columns of the matrix A.
%
%    real A(N,N), the N by N lower triangular matrix.
%
%    real B(N,:), the right hand side of the linear system.
%
%  Output:
%
%    real X(N,:), the solution of the linear system.
%
  x = b;
%
%  Solve L * x = b.
%
  for i = 1 : n
    x(i) = b(i) - ( a(i,1:i-1) * x(1:i-1) );
  end

  return
end
